Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-20-2017, 01:24 PM
mattbeaves mattbeaves is offline Random cell return using vlookup formula Windows 10 Random cell return using vlookup formula Office 2016
Novice
Random cell return using vlookup formula
 
Join Date: May 2017
Posts: 2
mattbeaves is on a distinguished road
Default Random cell return using vlookup formula

Hi


I have been designing a school report spreadsheet. I am looking to randomly select from a table array using vlookup. Basically at the moment when i enter a number in one worksheet it looks up from another worksheet, finds the name definition and returns the cell next to the number. I would like it to randomly select and return text from 5 or 6 cells next to the number so children don't get the same comment if they get the same effort grade. I hope the makes sense.
Formula so far
=IF(LEN(VLOOKUP(K69,Y6Cricket,2,0))=0,"",VLOOKUP(K 69,Y6Cricket,2,0))
Thanks
Matt
Reply With Quote
  #2  
Old 05-21-2017, 01:18 PM
ArviLaanemets ArviLaanemets is offline Random cell return using vlookup formula Windows 8 Random cell return using vlookup formula Office 2016
Expert
 
Join Date: May 2017
Posts: 875
ArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud of
Default

=IF(ISERROR(VLOOKUP(K69,Y6Cricket,1,0)),"",VLOOKUP (K69,Y6Cricket,1+RANDBETWEEN(1,6),0))
Reply With Quote
  #3  
Old 05-22-2017, 03:29 AM
mattbeaves mattbeaves is offline Random cell return using vlookup formula Windows 10 Random cell return using vlookup formula Office 2016
Novice
Random cell return using vlookup formula
 
Join Date: May 2017
Posts: 2
mattbeaves is on a distinguished road
Default Thank you

Thank you for your.

This works perfectly apart from one thing, I am trying to use this formula for 3 different column look ups on the same worksheet. Once I have entered the formula in the 3 coloumns, when changing the vlookup data in one column it changes all 3.

Thoughts?

Matt
Reply With Quote
  #4  
Old 05-22-2017, 04:38 AM
ArviLaanemets ArviLaanemets is offline Random cell return using vlookup formula Windows 8 Random cell return using vlookup formula Office 2016
Expert
 
Join Date: May 2017
Posts: 875
ArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud of
Default

Are you meaning, that when you change some value in your table, then all comments are recalculated? This is an Excel feature. When you have automatic calculation on, then any change in any cell in any open workbook forces all formulas in all open workbooks to be recalculated. To check this, type something into any cell outside your table - you see that all comments are renewed.

You can set formula calculation to manual, but it doesn't help anyway - then no comments are recalculated at all, even the one for which you changed data. And manual calculation through F9 recalculates all comments again.

The only easy way to get random comments which don't change later, is through VBA procedure. You have to write the procedure, which has to check the active cell, to dermine, is this cell the one where a comment belongs, to read all nessessary parameters from your table, to calculate a random comment, and then to write it into active cell.

Not easy (a lot of manual work) way: have a separate sheet/workbook to calculate comments, and then copy-paste them into your table.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Random cell return using vlookup formula Possible to use an existing vlookup formula to also insert correct info and trigger a SUM formula innkeeper9 Excel 2 09-13-2016 08:59 PM
Need a formula (possibly something like VLOOKUP) that will return multiple results. SilverUnicorn79 Excel 8 08-16-2016 01:34 PM
Random cell return using vlookup formula Formula to return next non-blank cell in a range Anyroad Excel 4 09-15-2015 04:13 PM
Would like to return a row rather than a cell using VLookup canajun Excel 7 12-10-2014 01:03 PM
Vlookup two columns return 3rd jennamae Excel 11 01-12-2014 02:53 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:53 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft