ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   random numbers (https://www.excelbanter.com/excel-worksheet-functions/61680-random-numbers.html)

Jules

random numbers
 
I'm running a macro which(using a For Loop), inputs the results from certain
calculations into a row and then carries out the same process entering the
data into the next row for 100 rows. The calculations involve using a random
number which has been generated in a different cell. I need a different
random number to be generated each time the calculations are done. At the
moment the random number is the same for each row.

Any advice on how to amend this without having to creat a list o f 100
random numbers?

Many Thanks


Gary''s Student

random numbers
 
Are the random numbers from 0 to 1 or are they randomly selected integers in
some range?
--
Gary''s Student


"Jules" wrote:

I'm running a macro which(using a For Loop), inputs the results from certain
calculations into a row and then carries out the same process entering the
data into the next row for 100 rows. The calculations involve using a random
number which has been generated in a different cell. I need a different
random number to be generated each time the calculations are done. At the
moment the random number is the same for each row.

Any advice on how to amend this without having to creat a list o f 100
random numbers?

Many Thanks


Jules

random numbers
 
they are random integers in the range 0.05 to 0.45

"Gary''s Student" wrote:

Are the random numbers from 0 to 1 or are they randomly selected integers in
some range?
--
Gary''s Student


"Jules" wrote:

I'm running a macro which(using a For Loop), inputs the results from certain
calculations into a row and then carries out the same process entering the
data into the next row for 100 rows. The calculations involve using a random
number which has been generated in a different cell. I need a different
random number to be generated each time the calculations are done. At the
moment the random number is the same for each row.

Any advice on how to amend this without having to creat a list o f 100
random numbers?

Many Thanks


Pete

random numbers
 
These are not integers!

Pete


Sandy Mann

random numbers
 
For a cell try:

=RAND()*0.4+0.05

or

N = Rnd() * 0.4 + 0.05

in the Macro
--
HTH

Sandy

with @tiscali.co.uk


"Jules" wrote in message
...
they are random integers in the range 0.05 to 0.45

"Gary''s Student" wrote:

Are the random numbers from 0 to 1 or are they randomly selected integers
in
some range?
--
Gary''s Student


"Jules" wrote:

I'm running a macro which(using a For Loop), inputs the results from
certain
calculations into a row and then carries out the same process entering
the
data into the next row for 100 rows. The calculations involve using a
random
number which has been generated in a different cell. I need a different
random number to be generated each time the calculations are done. At
the
moment the random number is the same for each row.

Any advice on how to amend this without having to creat a list o f 100
random numbers?

Many Thanks





vandenberg p

random numbers
 

If I understand the question I belive a: Application.Calculate
inside the loop would do it.

Pieter Vandenberg

Sandy Mann wrote:
: For a cell try:

: =RAND()*0.4+0.05

: or

: N = Rnd() * 0.4 + 0.05

: in the Macro
: --
: HTH

: Sandy
:
:
with @tiscali.co.uk


: "Jules" wrote in message
: ...
: they are random integers in the range 0.05 to 0.45
:
: "Gary''s Student" wrote:
:
: Are the random numbers from 0 to 1 or are they randomly selected integers
: in
: some range?
: --
: Gary''s Student
:
:
: "Jules" wrote:
:
: I'm running a macro which(using a For Loop), inputs the results from
: certain
: calculations into a row and then carries out the same process entering
: the
: data into the next row for 100 rows. The calculations involve using a
: random
: number which has been generated in a different cell. I need a different
: random number to be generated each time the calculations are done. At
: the
: moment the random number is the same for each row.
:
: Any advice on how to amend this without having to creat a list o f 100
: random numbers?
:
: Many Thanks
:





All times are GMT +1. The time now is 01:38 AM.

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