Hi everyone. I am working on a spreadsheet that will assign various tasks to individuals without assigning any task twice. Another stipulation is that certain individuals should not be assigned certain tasks deemed outside of their "area". Here is what I have done, thus far:

I assigned a number (1-198) to each task and grouped the tasks into specific areas. Then I used the following to generate random numbers between 144-159 across cells D46:G57.

Sub EXAMPLE()
Dim FillRange As Range, c As Range
Set FillRange = Range("D46:G57")
For Each c In FillRange
Do
c.Value = Int((159 - 144 + 1) * Rnd + 144)
Loop Until WorksheetFunction.CountIf(FillRange, c.Value) < 2
Next
End Sub

However, as you can see - the range of cells is greater than the number of integers between 144-159. Is there a way for me to specify that, once this has run, fill in the remaining cells with numbers that correspond to a second category of tasks?

Additionally, I have created several macros corresponding to different number ranges and cells. However, some of the categories overlap, and I am getting duplicate numbers.

Does anyone have a better solution for me? I am very much a beginner to all of this and appreciate any help you can offer.

Thanks!