Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

RANDBETWEEN generating numbers outside range

62 views
Skip to first unread message

Penny Black

unread,
May 25, 2010, 3:41:01 PM5/25/10
to
Using Excel 2003. Simple task of trying to generate a pseudo-random number
between 1 and 52 (yes, a deck of cards). I'm populating the cells with
=RANDBETWEEN(1,52). Many of the cells are displaying negative numbers.

Any ideas?

Fred Smith

unread,
May 25, 2010, 4:10:53 PM5/25/10
to
Are you sure that's exactly the formula you are using?

I entered =randbetwwen(1,52), filled it down 51 times, and got the expected
results: a bunch of numbers between 1 and 52, none negative.

Regards,
Fred

"Penny Black" <Penny...@discussions.microsoft.com> wrote in message
news:9615C6E4-C2EC-4145...@microsoft.com...

Gord Dibben

unread,
May 25, 2010, 4:12:19 PM5/25/10
to
I cannot replicate this in 2003.

I get all positives between 1 and 52.

I dragged down for 1000 rows and recalculated many times.

No negatives.

I can't think of a reason why you get negatives unless you have typed
negative top and/or bottom parameters.

Your example formula does not show that however.


Gord Dibben MS Excel MVP

Stephen Bye

unread,
May 25, 2010, 4:16:01 PM5/25/10
to
The RAND function returns negative numbers in Excel 2003
http://support.microsoft.com/kb/834520


Gord Dibben

unread,
May 25, 2010, 4:51:18 PM5/25/10
to
Thanks for the link Stephen.

Do you know if this problem also relates to RANDBETWEEN function?

Doesn't specifically state so but maybe??

I guess OP installing the hotfix wouldn't hurt.


Gord

Mike Middleton

unread,
May 25, 2010, 5:14:42 PM5/25/10
to
Penny Black -

My ideas are the same as I posted in the microsoft.public.mac.office.excel
newsgroup:

(A) Early Excel 2003 had a serious bug in its random number generator. Be
sure to update to Excel 2003 SP3.

(B) You may want to avoid duplicates, in which case search Bing or Google
for "excel unique random numbers" (without the quotes).

- Mike
http://www.MikeMiddleton.com

"Penny Black" <Penny...@discussions.microsoft.com> wrote in message
news:9615C6E4-C2EC-4145...@microsoft.com...

0 new messages