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.
Bookmarks