PDA

View Full Version : Solved: RANDBETWEEN FUNCTION



khalid79m
03-25-2009, 04:56 AM
I have the following formula
.FormulaR1C1 = "=RANDBETWEEN(1,50000000)" this works perfect in excel 2003 , but not in 2000 or 1997. Can anyone help ???

nirvana_1
03-25-2009, 05:14 AM
You can look up the functions under Insert -> Functions in the file menu to view available functions.

You need to select All functions to see if it is there.

I use excel xp and dont see RANDBETWEEN function. You can use RAND instead, something like this.

.FormulaR1C1 = "=RAND()*50000000"

You may need to format the cells as Numbers with 0 decimal places.

Kenneth Hobs
03-25-2009, 06:41 AM
=RANDBETWEEN() is in the Analysis ToolPak add-in.

Like it, you could use:
=INT((upperbound - lowerbound + 1) * RAND() + lowerbound)

khalid79m
03-26-2009, 05:36 AM
thanks all, all methods worked :)