Reputation: 23
Essentially, I want to have a random + or - so I'm using a RandBetween(-1,1). However, when the value is value is zero, I obviously get the same number I started off with. Is there a way to exclude the zero?
Thanks in advance!
Excel Example: =J1+(J1*RAND()*RANDBETWEEN(-1,1)*0.1)
Upvotes: 0
Views: 2323
Reputation: 51998
For fun, here is a different solution which uses RandBetween
:
=(-1)^RANDBETWEEN(0,1)
Upvotes: 2
Reputation:
This will select 1 or -1 with 50% probability:
=IF(RAND()<0.5, 1, -1)
Upvotes: 3