Results 1 to 3 of 3

Is this really random?

Threaded View

  1. #1
    Forum Contributor
    Join Date
    02-24-2010
    Location
    BC, Canada
    MS-Off Ver
    Excel 2010
    Posts
    174

    Is this really random?

    I have the following code. It looks at a list in column A on sheet "Rates" and returns a result, putting the result in B1 of the active sheet, and updating with a new random number every 2 seconds.

    RPT:
    inst = Sheets("Rate").Cells(Rnd * (Sheets("rate").Cells(Rows.Count, 1).End(xlUp).Row - 1) + 2, 1)
    Application.Range("B1").Value = inst
    Application.Wait (Now + timevalue("00:00:02"))
    GoTo RPT
    (warning, if you insert this into a test sheet to try it it will be difficult to stop because it will always be in the "wait" mode (unless there's a stop command I'm unaware of)

    The problem I have is, it isn't actually random. The results appear to be random, but every time I run it I get the exact same results in the same order. Is there a better function to use to grab a random number from a list? List I want is in the inactive sheet "Rates" from row 3 up to the last row (which may change a lot).

    Thanks
    Last edited by The Phil; 07-27-2013 at 02:39 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 3
    Last Post: 09-30-2012, 03:03 PM
  2. [SOLVED] Ordering random letters for a chance-random based TV gameshow.
    By Askalian in forum Excel General
    Replies: 4
    Last Post: 06-19-2012, 02:26 PM
  3. Non-random numbers generated by excel's data analysis random gener
    By Allie in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 09-17-2005, 02:05 AM
  4. [SOLVED] Re: Non-random numbers generated by excel's data analysis random gener
    By Harlan Grove in forum Excel General
    Replies: 2
    Last Post: 09-13-2005, 12:05 PM
  5. [SOLVED] How do I find random number in list of random alpha? (Position is.
    By jlahealth-partners in forum Excel General
    Replies: 0
    Last Post: 02-08-2005, 02:06 PM

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