Avatar of ExpExchHelp
ExpExchHelp
Flag for United States of America asked on

Excel -- random number... either -1 or 1

Experts:

I need a random number function that gives me only two values:  -1 or 1

Below rand function also generates three values: -1, 0, 1  

=RAND()*((-1)^INT(RAND()*10))

How should this function to be modified to only get -1 and 1?

EEH
Microsoft Excel

Avatar of undefined
Last Comment
ExpExchHelp

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Norie

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
ExpExchHelp

ASKER
Awesome... thanks for the prompt response!

EEH
Saqib Husain

Another option although the question is closed

=2*INT(RAND()*2)-1
ExpExchHelp

ASKER
ssaqibh -- thanks!
Your help has saved me hundreds of hours of internet surfing.
fblack61