My assignment wants me to have a RAND nested inside a VLOOKUP but I'm not sure how exactly that would look.
What would a basic nested rand function look like?
stu.png
My assignment wants me to have a RAND nested inside a VLOOKUP but I'm not sure how exactly that would look.
What would a basic nested rand function look like?
stu.png
Many members are unable to see images in the *.png format due to forum compatibility issues with some browsers.
If you need to post an image post it in the *.jpg format.
Even better than posting images... post a SMALL sample file. That way we can test solutions directly in the file with the relevant data.
Biff
Microsoft MVP Excel
Keep It Simple Stupid
Let's Go Pens. We Want The Cup.
What is the logic behind using a random number in the VLOOKUP() function? That will determine what it looks like. There are four arguments to the VLOOKUP() function (https://support.office.com/en-us/art...8-93a18ad188a1 ):
1) first argument -- lookup value. Find a random number in your lookup table and return the corresponding value from the desired column. =VLOOKUP(RAND(),lookup_table,col#,approx_match).
2) second argument -- lookup table. Generate some random numbers, then find the desired number in that set of random numbers. =VLOOKUP(lookup_value,range of cells containing RAND() function,col #,approx_match)
3) third argument -- column # -- return the value from a random column =VLOOKUP(lookup_value,lookup_table,RANDBETWEEN(1,5),approx_match)
4) fourth argument -- approx_match -- randomly decide whether to do a linear search/exact match or a binary search/approximate match =VLOOKUP(lookup_value,lookup_table,col#,RANDBETWEEN(0,1))
Those are the ways I could see using random numbers in the VLOOKUP() function. Decide which logic best represents what you are trying to do.
Originally Posted by shg
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks