random# btw 1-9 without 6

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

im trying to use rand() or randbetween to get a random number btwn 1 and 9
but excluding 6 as a posibility. is it possible?
 
Assuming this is a different question than your other thread (please
keep questions in the same thread if possible - it reduces the chance
that people will waste time suggesting answers that have already been
offered), here's one way, using 2 cells (it's actually the same way, of
course):

A1: =RANDBETWEEN(1,8)
A2: =A1+(A1>=6)
 
Hi Tracker
Maybe you could also consider this option.
=IF(RANDBETWEEN(1,9)=6,"",RANDBETWEEN(1,9))

HTH
Michael Mitchelson
 
Unfortunately, that won't work. The second RANDBETWEEN is independent of
the first, so if the first one<>6, the second one *could* =6.
 
Back
Top