I need to scan for random account numbers through a sheet containing account numbers and their details. I have used the following formula to do this:
Formula:Please Login or Register to view this content.
The catch is that column A of the sheet, which contains the account numbers, also contains blank cells between account numbers, and the account numbers are not evenly spaced from each other, and I require the formula to return only account numbers and not blank cells.
My solution to this has been to try to evaluate the result of the INDEX-RANDBETWEEN formula above using an IF statement in order to decide whether I want to try run the formula again so that I can get a different result.
I have used:
Formula:Please Login or Register to view this content.
In the THEN condition of the IF statement I changed the RANDBETWEEN range to start on the third row to try and "force" a new random process from occuring (not sure if this is necessary). I have gone on to nest this process as far as probabilistically sufficient in my mind but the formula seems still to return a disproportionate number of blank results, leading me to believe that nesting these functions like this does not force Excel to try a different random cell on the RETRENCHMENT sheet.
My end result of nesting was this:
Formula:Please Login or Register to view this content.
Is there a more efficient way (and that works) of letting Excel perform a random number generation, having it evaluate the result of this process and then based on this result either return the result or re-run the random number generation to return a different result?
Bookmarks