Thread: RANDBETWEEN
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
[email protected] snasui@gmail.com is offline
external usenet poster
 
Posts: 9
Default RANDBETWEEN

Ranbetween 50-100

=Int(Rand()*(50+1)+50) or

=Int(Rand()*51+50)

Santipong

T. Valko เขียน:
That's pretty limited.

What if the range was 50 to 100 ?

Biff

wrote in message
ups.com...
Another way:

=Int(Rand()*100+1)


T. Valko ?????:
Don't have any suggestions about what's happening with the ATP.

As an alternative to the ATP RANDBETWEEN function, try this:

=INT((top_number-bottom_number+1)*RAND()+bottom_number)

For example:

=RANDBETWEEN(1,100)
=INT((100-1+1)*RAND()+1)

Note that this is still a *volatile* function

Biff

"pkeegs" wrote in message
...
I have a worksheet which generates a random number between two base
numbers
using the RANDBETWEEN Function. Whenever I close the sheet and reopen,
the
workbook won't recognise the function. I go into the add-ins and check
the
Analysis Toolpak option, reset my number and it works fine - until I
open
it
after closing. Again I have to go in and recheck the Analysis Toopak.
Any
suggestions as to what is going on.

Regards - Peterk