Hello all,
Maybe some one could help me with this code.
I would like to pick 25 unique random numbers from a column and give them a color
the code below does that but it also picks also duplicates and that's something I don't want.
Is there a code that prevents getting duplicates?
Dim randomNum As Long
For Rcounter = 1 To 25 'door het cijfer aan te passen verander je de aantallen die willekeurig worden gekozen
randomNum = WorksheetFunction.RandBetween(StartRow, LastRow)
Cells(randomNum, ColumnD).Interior.Color = RGB(255, 207, 153)
Cells(randomNum, ColumnD).Select
Next Rcounter
Thanks in advance for your help,
RV
Bookmarks