View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.misc
Victor Delta[_2_] Victor Delta[_2_] is offline
external usenet poster
 
Posts: 199
Default Random number macro

"Victor Delta" wrote in message
...
I would like to create an Excel macro which will put a series of random
integers (leaving values not the formulas) in cells in a column. It should
start in the currently selected cell and fill downwards until it has
covered the number of cells given by the number in, say, cell P1. The
random integers should be between 1 and the number in cell P2 (inclusive).


Many thanks for all the helpful suggestions - I'll give them all a try.

Mike H - many thanks for your second solution although actually my limit
will be less than the range of cells so some random numbers will repeat and
not be unique.

By the way, should have told you that I'm actually using Excel 2003 - not
sure I can see the RANDBETWEEN function?

Thanks again,

V