Results 1 to 5 of 5

Programming an IF condition in relation to randomizing rosters...

Threaded View

  1. #1
    Registered User
    Join Date
    10-22-2019
    Location
    California, US
    MS-Off Ver
    2016 (64-bit)
    Posts
    70

    Programming an IF condition in relation to randomizing rosters...

    Is it possible to modify this code that randomizes all the rosters on the spreadsheet I attached so that when a 'Unique' value is obtained, it is left alone?

    Would it be another IF statement I have to add? Something like, IF value of pair is 'Unique', leave alone, and randomize the rest until they're "Unique". I want to make it so that I can randomize for 100% 'Unique' results more effectively. Right now the desired percentage is at 92% because I haven't been able to get anything closer to 100%.



    Sub refresher()
    
    For Count = 1 To 500
    Calculate
    
    UniCount = Application.CountIf(Range("A:F"), "Unique")
    DupCount = Application.CountIf(Range("A:F"), "Duplicate")
    
    Percent = UniCount / (UniCount + DupCount)
    
    If UniCount / (UniCount + DupCount) > 0.92 Then Exit For
    
    Next
    
    End Sub
    I've attached a sample of the workbook. All the names are Marvel or DC character names.

    Let me know if I need to clarify anything.
    Attached Files Attached Files
    Last edited by machinegod; 11-05-2019 at 08:05 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Rosters
    By villm001 in forum Excel General
    Replies: 5
    Last Post: 10-18-2019, 03:40 PM
  2. Macro to reconcile two rosters...maybe?
    By jaredcass in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-17-2015, 03:11 PM
  3. programming to play a sound when cell condition is met
    By pip_taker in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 07-18-2014, 03:12 AM
  4. looking to email individul rosters
    By tvt0290 in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 09-21-2013, 07:26 AM
  5. Setting up Rosters
    By ian.clark in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-21-2013, 02:53 AM
  6. Replies: 0
    Last Post: 11-26-2012, 05:02 AM
  7. Staff Rosters.
    By Delma in forum Excel General
    Replies: 1
    Last Post: 12-12-2005, 11:10 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