ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Help for Random Number Generation (https://www.excelbanter.com/excel-worksheet-functions/141735-help-random-number-generation.html)

krisinvincible

Help for Random Number Generation
 
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, b0 and
2. b-a always lies between 0.2 and 0.8.

Much Thanks for your help


dq

Help for Random Number Generation
 
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


Gary''s Student

Help for Random Number Generation
 
For b in B1 enter:

=0.6*RAND()+0.2

For a in A1 enter:

=-(0.8-B1)*RAND()

--
Gary''s Student - gsnu200719

Bernd

Help for Random Number Generation
 
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



All times are GMT +1. The time now is 12:12 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com