I’m following this Excel guide to use vlookup and randbetween to select a random cell from a sorted list. Unfortunately, either the guide is flawed or there’s a discrepancy between Excel and LibreOffice Calc. Anyway, I could use some help.
I’m using this function:
=VLOOKUP(RANDBETWEEN(1;100);A:C;3;TRUE())
It draws a random number between 1 and 100 and looks in column A for the matching number. Because it’s a sorted list and I’ve set the function to TRUE it will always return a number, even if it can’t find an exact match.
What I need (and what the guide says) is that the function draws the next closest match below. I.e., if it draws ‘23’ and goes along the list ‘19, 21, 22, 27, 29’ it will take 27. What it currently does is it pulls up the next closest match above.
Is there a way around this?