Tracker,
Another way, which might be a little more complicated is to use IFs for
different ranges. For example, if you wanted a random number between 1-4 or
6-9 (ie, not 5) you could make a formula that 50% of the time gives a number
between 1 and 4 and 50% of the time gives a number between 6 and 9. This
one's easy though, because it's 50-50. If you want to remove numbers other
than 5, you'd have to modify the proportions.
=if( rand() < 0.5, RANDBETWEEN(1,4), RANDBETWEEN(6,9) )
Let's see. If you're always working between 1 and 9, and the number you
want to exlude is "X", then:
=if( rand() < (X-1)/8, RANDBETWEEN(1,X-1), RANDBETWEEN(X+1,9) )
I have to run, so I haven't checked if this formula works, but it or
something like it should do the job.
Eric
Tracker said:
Yes that helps.but lets say i needed to randomize 1-9 in nine cells that
exclude the number in the top cell of the nine cells?
JE McGimpsey said:
Did you try "Jay"s solution? If you copy A2:B2 down as far as desired,
you get results (in column B) for each cell in the range [1...9]
excluding the value in the "cell above it".
This post, at least as far as I can tell, doesn't add any information
that would indicate that "Jay"s solution doesn't fit.
Do you *always* want to exclude the same number? Do you want to exclude
more than one number (e.g., 8 and 5)?
Tracker said:
I might of explained it wrong. I want to use random(1,9) but for example i
dont want 5 in the random possibility.Is that possible?