J
jsl
I use RAND() frequently with parameters such that I don't get generated
numbers that will cause nonsensicle returns given their use. I've been
using this successfully for a long time. Now, they are no longer working.
The only difference I know of is that I am now using Office 2003 instead of
Office XP (2002?). In any event, here are some specifics.
I used to use:
=ROUND(RAND()*(25-1)+1,0)
to generate a random integer between 1 and 25, inclusive. Worked fine.
Until now that is. Now, it often returns negative values, which I don't
want. I changed it to min(ROUND(RAND()*(25-1)+1,0),1) as a workaround, but
that didn't work either. I then discoverd the RANDBETWEEN() function in the
Analysis Toolpack, so I tried it:
=ROUND(RANDBETWEEN(1,25),0)
or
=ROUND(RANDBETWEEN(100,500),-2)
No dice. I often get zeros returned, which don't fly. Anybody have any
idea if I am doing something wrong or if this is a serious bug in Excel
2003?
Thanks,
Jim
numbers that will cause nonsensicle returns given their use. I've been
using this successfully for a long time. Now, they are no longer working.
The only difference I know of is that I am now using Office 2003 instead of
Office XP (2002?). In any event, here are some specifics.
I used to use:
=ROUND(RAND()*(25-1)+1,0)
to generate a random integer between 1 and 25, inclusive. Worked fine.
Until now that is. Now, it often returns negative values, which I don't
want. I changed it to min(ROUND(RAND()*(25-1)+1,0),1) as a workaround, but
that didn't work either. I then discoverd the RANDBETWEEN() function in the
Analysis Toolpack, so I tried it:
=ROUND(RANDBETWEEN(1,25),0)
or
=ROUND(RANDBETWEEN(100,500),-2)
No dice. I often get zeros returned, which don't fly. Anybody have any
idea if I am doing something wrong or if this is a serious bug in Excel
2003?
Thanks,
Jim