Results 1 to 4 of 4

"Do Until Matches Criteria"-Loop Thru Randomised Range, With Counter

Threaded View

  1. #1
    Registered User
    Join Date
    08-21-2012
    Location
    Somerset West, South Africa
    MS-Off Ver
    Excel 2010
    Posts
    16

    Cool "Do Until Matches Criteria"-Loop Thru Randomised Range, With Counter

    Hi.
    I need to create a macro that will firstly create a random (=RAND ()) range of numbers (e.g. between 0-20), then repeatedly randomise these numbers (F9) until, let's say, 5 of them match 5 other numbers (within the same range) specified in a separate row (i.e. "do until" loop, until criteria are met), while at the same time counting the number of times it repeats the loop until it matches the criteria. Upon matching the criteria, it must show the resultant number of loops (F9's) in a separate cell. It must then repeat the procedure for subsequent rows until it reaches an empty row of cells.
    Any ideas greatly appreciated.
    Attached Files Attached Files
    Last edited by GUERCHARD; 06-23-2013 at 03:03 PM. Reason: example excel file added

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