+ Reply to Thread
Results 1 to 6 of 6

random numbers

  1. #1
    Jules
    Guest

    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


  2. #2
    Gary''s Student
    Guest

    RE: 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
    >


  3. #3
    Jules
    Guest

    RE: 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
    > >


  4. #4
    Pete
    Guest

    Re: random numbers

    These are not integers!

    Pete


  5. #5
    Sandy Mann
    Guest

    Re: random numbers

    For a cell try:

    =RAND()*0.4+0.05

    or

    N = Rnd() * 0.4 + 0.05

    in the Macro
    --
    HTH

    Sandy
    [email protected]
    [email protected] with @tiscali.co.uk


    "Jules" <[email protected]> wrote in message
    news:[email protected]...
    > 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
    >> >





  6. #6
    vandenberg p
    Guest

    Re: random numbers


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

    Pieter Vandenberg

    Sandy Mann <[email protected]> wrote:
    : For a cell try:

    : =RAND()*0.4+0.05

    : or

    : N = Rnd() * 0.4 + 0.05

    : in the Macro
    : --
    : HTH

    : Sandy
    : [email protected]
    : [email protected] with @tiscali.co.uk


    : "Jules" <[email protected]> wrote in message
    : news:[email protected]...
    :> 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
    :>> >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1