Rand function error

rdstagg

New Member
Joined
Oct 29, 2003
Messages
44
IF(randbetween(1,100)<=G$4,RAND()*G$3,-RAND()*G$2)

I am a relative newbie. I copied this function from a book. It is supposed to generate 100 random trade outcomes in % terms.
Just returns the name error!!
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
From the xl help file:

RANDBETWEEN

Returns a random number between the numbers you specify. A new random number is returned every time the worksheet is calculated.

If this function is not available, and returns the #NAME? error, install and load the Analysis ToolPak add-in

You need the Analysis Toolpak!
 
Upvote 0
Right from Excel's help on the RANDBETWEEN function:

If this function is not available, and returns the #NAME? error, install and load the Analysis ToolPak add-in.

Go to Tools | Add-ins and see if the Aanlysis ToolPak is listed as an option. If it is, select the check box. If not, you will need to install it, then check this box.
 
Upvote 0
No - I have the add ins - so thats not the problem.
er sorry - after I rebooted it all worked.

Thanks
PS the message you get in your help file does not appear in my randbetween function help file!!
 
Upvote 0

Forum statistics

Threads
1,222,621
Messages
6,167,112
Members
452,097
Latest member
Marshall813

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top