Sorry, 90-21 is 69 not 79! Corrected version:
Sun, 3 Feb 2008 15:51:38 -0800 from Tyro <(E-Mail Removed)>:
> =RAND()*(b-a)+a taken from the Excel help file. So in your case
> RAND()*(90-21)+21. If you want integers only then =INT(RAND()*(90-21)+21
I don't think this is correct, even leaving aside the matter of your
missing parenthesis. rand() returns a random real number
0 <= rand() < 1,
so
0 <= rand()*(90-21) < 69
But int() truncates, so the whole numbers will be between 0 and 68,
not 0 and 69. And the given formula
=INT(RAND()*(90-21)+21
will give values 21 to 89, not 21 to 90.
> In Excel 2007, = RANDBETWEEN(21,90)
It's not limited to Excel 2007; works just fine in Excel 2003.
--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
"If there's one thing I know, it's men. I ought to: it's
been my life work." -- Marie Dressler, in /Dinner at Eight/