+ Reply to Thread
Results 1 to 3 of 3

rand keeps generating new random number

  1. #1
    Registered User
    Join Date
    01-30-2013
    Location
    canada
    MS-Off Ver
    Excel 2007
    Posts
    13

    rand keeps generating new random number

    Hi,

    I am using rand to produce a column of numbers in woorksheet 1

    =(COS(RADIANS(RANDBETWEEN(0,360))))*(1/$C$27)

    in worksheet 2 i have this in a column that copies the contents of the column in worksheet 1

    =worksheet1l!AB8
    =worksheet1l!AB9
    .
    .
    .
    .

    Anytime i do an operation to the column in worksheet 2 new random numbers are generated, which i dont want

    is there someway i can get them to generate on command only?

  2. #2
    Registered User
    Join Date
    03-02-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    67

    Re: rand keeps generating new random number

    Any Function will undergo a recalculation whenever changes are made to workbook. Rand will keep changing values as the purpose of Rand is to provide a random value. Execute a Copy -> Paste Special - Values to make the formula into a value to solve your problem

  3. #3
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: rand keeps generating new random number

    Yes, you can set your workbook to do manual calculation. Formula calculations will only occur when opening the workbook or when you enter a new formula or tell it to calculate (F9)
    On File Tab> Options> Formulas >Set Workbook Calculation to Manual

    Alternately, Copy and paste special > values to make the rand values constants. You'd need to retype in the formulas to do a new set of rand values though.
    Does that help?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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