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?

[Webinar] Streamline your web hosting managementRegister Today

x
 
NorieConnect With a Mentor VBA 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
All Courses

From novice to tech pro — start learning today.