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
ExpExchHelpAsked:
Who is Participating?
 
NorieVBA ExpertCommented:
You could try this.

=IF(RAND()>0.5, -1, 1)
0
 
ExpExchHelpAuthor Commented:
Awesome... thanks for the prompt response!

EEH
0
 
Saqib Husain, SyedEngineerCommented:
Another option although the question is closed

=2*INT(RAND()*2)-1
0
 
ExpExchHelpAuthor Commented:
ssaqibh -- thanks!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.