RANDBETWEEN

P

pkeegs

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
 
T

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
 
T

T. Valko

That's pretty limited.

What if the range was 50 to 100 ?

Biff

Another way:

=Int(Rand()*100+1)


T. Valko ?????:
 
P

pkeegs

Good Question bj. I admit I move around the options pretty quick, and am sure
that the box was checked before I exited, but will focus on that next time,

Regards
 
S

snasui

Ranbetween 50-100

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

=Int(Rand()*51+50)

Santipong

T. Valko เขียน:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top