Help for Random Number Generation

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi, Guys,
I would really appreciate if any one of you guys can help me with the
following question.

I want to generate two numbers a, b which satisfies the following conditions
1. a<0, b>0 and
2. b-a always lies between 0.2 and 0.8.

Much Thanks for your help
 
A1: =-RANDBETWEEN(0,9999999)/10000
A2: -RANDBETWEEN(-(A1+0.8)*10000,-(A1+0.2)*10000)/10000

Change the values 9999999 and 10000 according to the range and
accuracy you require.

DQ
 
Hello,

Put into A1:
=-RAND()*1E14
and into B1:
=-A1+RAND()*(0.8-0.2)+0.2

You can substitute 1E14 by any smaller number > 0.

Regards,
Bernd
 
Back
Top