+ Reply to Thread
Results 1 to 6 of 6

Repeat random numbers from a range and text

  1. #1
    kitkat1
    Guest

    Repeat random numbers from a range and text

    I am new at this, I need to create 2 different types of randomness, one of
    numbers and one of text selections.

    #1 a range of numbers, i.e, 134-2807 that allows repeat of numbers with a
    return of only 25 numbers. This random option is use daily so I need to be
    able to create a worksheet where each day only the range is changed, (without
    having to key the each number of the range to a separate row line)

    #2 a range of 5 process types, i.e, data, irsdat, ardat, ispdat, dsldat,
    where 3 processes are selected daily from the 5 listed which allows repeat of
    processes.

    I reviewed the RAND and RANDBETWEEN help files but I am confused if the
    formulas are keyed to the same worksheet where the random options are
    generated. I would actually like to have in both cases above, the random
    selections generated to a separate worksheet. Where do I start?

  2. #2
    RagDyeR
    Guest

    Re: Repeat random numbers from a range and text

    For #1
    Enter this formula and copy down 25 rows:

    =INT(RAND()*2674+134)

    Hit <F9> to get a new list of random numbers.

    Note: You did say to allow repeats!

    For #2
    Enter this formula and copy down 3 rows:

    =INDEX({"data","irsdat","ardat","ispdat","dsldat"},INT(RAND()*5)+1)

    AGAIN:
    Hit <F9> to get a new list of random numbers.

    Note: You did say to allow repeats!

    --

    HTH,

    RD
    =====================================================
    Please keep all correspondence within the Group, so all may benefit!
    =====================================================


    "kitkat1" <u23887@uwe> wrote in message news:62f3e842ce154@uwe...
    I am new at this, I need to create 2 different types of randomness, one of
    numbers and one of text selections.

    #1 a range of numbers, i.e, 134-2807 that allows repeat of numbers with a
    return of only 25 numbers. This random option is use daily so I need to be
    able to create a worksheet where each day only the range is changed,
    (without
    having to key the each number of the range to a separate row line)

    #2 a range of 5 process types, i.e, data, irsdat, ardat, ispdat, dsldat,
    where 3 processes are selected daily from the 5 listed which allows repeat
    of
    processes.

    I reviewed the RAND and RANDBETWEEN help files but I am confused if the
    formulas are keyed to the same worksheet where the random options are
    generated. I would actually like to have in both cases above, the random
    selections generated to a separate worksheet. Where do I start?



  3. #3
    kitkat1
    Guest

    Re: Repeat random numbers from a range and text

    Thank you for your help, two more questions if I may.

    1). Is there a way to stop the random list from changing, can I link it to
    another worksheet that is potected to prevent losing the original selection?

    2). Also, if my number range changes all I have to do is change the number
    range in the formula would this be correct?

    RagDyeR wrote:
    >For #1
    >Enter this formula and copy down 25 rows:
    >
    >=INT(RAND()*2674+134)
    >
    >Hit <F9> to get a new list of random numbers.
    >
    >Note: You did say to allow repeats!
    >
    >For #2
    >Enter this formula and copy down 3 rows:
    >
    >=INDEX({"data","irsdat","ardat","ispdat","dsldat"},INT(RAND()*5)+1)
    >
    >AGAIN:
    >Hit <F9> to get a new list of random numbers.
    >
    >Note: You did say to allow repeats!
    >
    >I am new at this, I need to create 2 different types of randomness, one of
    >numbers and one of text selections.
    >
    >#1 a range of numbers, i.e, 134-2807 that allows repeat of numbers with a
    >return of only 25 numbers. This random option is use daily so I need to be
    >able to create a worksheet where each day only the range is changed,
    >(without
    >having to key the each number of the range to a separate row line)
    >
    >#2 a range of 5 process types, i.e, data, irsdat, ardat, ispdat, dsldat,
    >where 3 processes are selected daily from the 5 listed which allows repeat
    >of
    >processes.
    >
    >I reviewed the RAND and RANDBETWEEN help files but I am confused if the
    >formulas are keyed to the same worksheet where the random options are
    >generated. I would actually like to have in both cases above, the random
    >selections generated to a separate worksheet. Where do I start?


  4. #4
    Ragdyer
    Guest

    Re: Repeat random numbers from a range and text

    First of all, you should turn *off* automatic calculation.
    <Tools> Options> <Calculation> tab,
    And click on "Manual" under 'Calculation', then <OK>.

    [ #1 ]
    Now, select the 25 numbers and right click in the selection, and choose
    "Copy".
    Navigate to the new location (either other sheet or other workbook), and
    right click in the top cell of this new location and choose "Paste Special".
    Then click on "Values", then <OK>.

    What you have done here is *just copied* the numbers (values), *not* the
    formulas behind the numbers.
    This way the numbers *cannot* change when you calculate any new sets.

    With the calculation set to "Manual", hitting <F9> *still* (manually)
    calculates the workbook, and gives you a new random set.

    [ #2 ]
    The formula for returning random numbers between 2 chosen numbers is:

    RAND()*(b-a)+a
    With "a" as the minimum limit,
    And "b" as the maximum limit.

    *HOWEVER*, this returns decimals.
    So, when we wrap the formula in the INT() function, to return an integer,
    the formula changes slightly to:

    =INT(RAND()*(b+1-a)+a)

    So all you have to do to change your range of numbers is plug them into the
    above (INT) formula.

    --
    HTH,

    RD

    ---------------------------------------------------------------------------
    Please keep all correspondence within the NewsGroup, so all may benefit !
    ---------------------------------------------------------------------------
    "kitkat1" <u23887@uwe> wrote in message news:62f5631776036@uwe...
    > Thank you for your help, two more questions if I may.
    >
    > 1). Is there a way to stop the random list from changing, can I link it to
    > another worksheet that is potected to prevent losing the original

    selection?
    >
    > 2). Also, if my number range changes all I have to do is change the number
    > range in the formula would this be correct?
    >
    > RagDyeR wrote:
    > >For #1
    > >Enter this formula and copy down 25 rows:
    > >
    > >=INT(RAND()*2674+134)
    > >
    > >Hit <F9> to get a new list of random numbers.
    > >
    > >Note: You did say to allow repeats!
    > >
    > >For #2
    > >Enter this formula and copy down 3 rows:
    > >
    > >=INDEX({"data","irsdat","ardat","ispdat","dsldat"},INT(RAND()*5)+1)
    > >
    > >AGAIN:
    > >Hit <F9> to get a new list of random numbers.
    > >
    > >Note: You did say to allow repeats!
    > >
    > >I am new at this, I need to create 2 different types of randomness, one

    of
    > >numbers and one of text selections.
    > >
    > >#1 a range of numbers, i.e, 134-2807 that allows repeat of numbers with a
    > >return of only 25 numbers. This random option is use daily so I need to

    be
    > >able to create a worksheet where each day only the range is changed,
    > >(without
    > >having to key the each number of the range to a separate row line)
    > >
    > >#2 a range of 5 process types, i.e, data, irsdat, ardat, ispdat, dsldat,
    > >where 3 processes are selected daily from the 5 listed which allows

    repeat
    > >of
    > >processes.
    > >
    > >I reviewed the RAND and RANDBETWEEN help files but I am confused if the
    > >formulas are keyed to the same worksheet where the random options are
    > >generated. I would actually like to have in both cases above, the random
    > >selections generated to a separate worksheet. Where do I start?



  5. #5
    kitkat1 via OfficeKB.com
    Guest

    Re: Repeat random numbers from a range and text

    Thank you so much Ragdyer. I do understand this logic now that I have used
    the examples provided to me. Thank you for your help and patience. Have a
    great week!

    Ragdyer wrote:
    >First of all, you should turn *off* automatic calculation.
    ><Tools> Options> <Calculation> tab,
    >And click on "Manual" under 'Calculation', then <OK>.
    >
    >[ #1 ]
    >Now, select the 25 numbers and right click in the selection, and choose
    >"Copy".
    >Navigate to the new location (either other sheet or other workbook), and
    >right click in the top cell of this new location and choose "Paste Special".
    >Then click on "Values", then <OK>.
    >
    >What you have done here is *just copied* the numbers (values), *not* the
    >formulas behind the numbers.
    >This way the numbers *cannot* change when you calculate any new sets.
    >
    >With the calculation set to "Manual", hitting <F9> *still* (manually)
    >calculates the workbook, and gives you a new random set.
    >
    >[ #2 ]
    >The formula for returning random numbers between 2 chosen numbers is:
    >
    >RAND()*(b-a)+a
    >With "a" as the minimum limit,
    >And "b" as the maximum limit.
    >
    >*HOWEVER*, this returns decimals.
    >So, when we wrap the formula in the INT() function, to return an integer,
    >the formula changes slightly to:
    >
    >=INT(RAND()*(b+1-a)+a)
    >
    >So all you have to do to change your range of numbers is plug them into the
    >above (INT) formula.
    >
    >> Thank you for your help, two more questions if I may.
    >>

    >[quoted text clipped - 41 lines]
    >> >generated. I would actually like to have in both cases above, the random
    >> >selections generated to a separate worksheet. Where do I start?


    --
    Message posted via http://www.officekb.com

  6. #6
    RagDyeR
    Guest

    Re: Repeat random numbers from a range and text

    Thank you for the feed-back.
    --

    Regards,

    RD
    ----------------------------------------------------------------------------
    -------------------
    Please keep all correspondence within the Group, so all may benefit !
    ----------------------------------------------------------------------------
    -------------------

    "kitkat1 via OfficeKB.com" <u23887@uwe> wrote in message
    news:630881347e471@uwe...
    Thank you so much Ragdyer. I do understand this logic now that I have used
    the examples provided to me. Thank you for your help and patience. Have a
    great week!

    Ragdyer wrote:
    >First of all, you should turn *off* automatic calculation.
    ><Tools> Options> <Calculation> tab,
    >And click on "Manual" under 'Calculation', then <OK>.
    >
    >[ #1 ]
    >Now, select the 25 numbers and right click in the selection, and choose
    >"Copy".
    >Navigate to the new location (either other sheet or other workbook), and
    >right click in the top cell of this new location and choose "Paste

    Special".
    >Then click on "Values", then <OK>.
    >
    >What you have done here is *just copied* the numbers (values), *not* the
    >formulas behind the numbers.
    >This way the numbers *cannot* change when you calculate any new sets.
    >
    >With the calculation set to "Manual", hitting <F9> *still* (manually)
    >calculates the workbook, and gives you a new random set.
    >
    >[ #2 ]
    >The formula for returning random numbers between 2 chosen numbers is:
    >
    >RAND()*(b-a)+a
    >With "a" as the minimum limit,
    >And "b" as the maximum limit.
    >
    >*HOWEVER*, this returns decimals.
    >So, when we wrap the formula in the INT() function, to return an integer,
    >the formula changes slightly to:
    >
    >=INT(RAND()*(b+1-a)+a)
    >
    >So all you have to do to change your range of numbers is plug them into the
    >above (INT) formula.
    >
    >> Thank you for your help, two more questions if I may.
    >>

    >[quoted text clipped - 41 lines]
    >> >generated. I would actually like to have in both cases above, the

    random
    >> >selections generated to a separate worksheet. Where do I start?


    --
    Message posted via http://www.officekb.com



+ 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