ExpExchHelp
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()*1 0))
How should this function to be modified to only get -1 and 1?
EEH
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()*1
How should this function to be modified to only get -1 and 1?
EEH
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Another option although the question is closed
=2*INT(RAND()*2)-1
=2*INT(RAND()*2)-1
ASKER
ssaqibh -- thanks!
ASKER
EEH