Random numbers formula

J

John

Hi,

What is the formula to generate random numbers in a
specified range? For example: I want to generate random
numbers between 1 to 80. I also want the random numbers in
whole not decimals.

Thanx

John
 
D

Dave Peterson

Take a look at:

=randbetween(1,80)

It does require that you load the analysis toolpak. (Excel's help for
randbetween explains this.)
 
N

Norman Harker

Hi John!

If you want a robust solution that will work with or without RANDBETWEEN,
you can use:

=INT(RAND()*(80-1+1))+1

It's based on a formula I got from a post by Tushar Mehta:

=INT(RAND()*(B-A+1))+A
Where B>0
--
--
Regards
Norman Harker MVP (Excel)
Sydney, Australia
[email protected]
Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
 
Top