Hi. You can achieve this with RAND or RANDBETWEEN on the worksheet but that's a volatile function so it will re-calculate the groups each time you change the value in any other cell. If that's not acceptable then you'll need to use VBA to create the groups. Which do you prefer?
Public Function MyRand(seed As Long, occurrence As Long)
MyRand = Rnd(-seed)
Do While occurrence > 1
MyRand = Rnd
occurrence = occurrence - 1
Loop
End Function
We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel
Which adblocker are you using?
Disable AdBlock
Follow these easy steps to disable AdBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the icon in the browser’s toolbar. 2)Click on the "Pause on this site" option.
Go back
Disable AdBlock Plus
Follow these easy steps to disable AdBlock Plus
1)Click on the icon in the browser’s toolbar. 2)Click on the toggle to disable it for "mrexcel.com".
Go back
Disable uBlock Origin
Follow these easy steps to disable uBlock Origin
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.
Go back
Disable uBlock
Follow these easy steps to disable uBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.