View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Harlan Grove Harlan Grove is offline
external usenet poster
 
Posts: 733
Default random numbers repeating

John T wrote...
I'm using random number generation using randbetween(0,10).

Is there a way of stopping it from displaying the same number twice in
a row?


No, because there's nonzero probability that drawing from 0..10 with
replacement will produce duplicates.

If you could live with circular recalc, run the menu command Tools
Options, select the Calculation tab in the Options dialog, check the
Iteration box and set Maximum iterations to 1. Then try the following
formula in cell A1.

=MOD(A1+RANDBETWEEN(1,10),11)