The room check has six slots, with teams Blue, Green and Gold in rotation. Record slot numbers beginning at 1 in column A so assignments travel with their records when you sort.

Turn the remainder into a team index

Enter this formula in B2 and fill it down.

=CHOOSE(MOD(A2-1,3)+1,"Blue","Green","Gold")

Slot 1 gives remainder 0 and option 1, Blue. Slot 2 gives option 2, Green. Slot 3 gives option 3, Gold.

Six room-check slots repeat Blue, Green, Gold twice.

Illustrated assignment sequence for slots 1–6.

Test the first wraparound

Slot 4 gives MOD(3,3)=0, so Blue starts the cycle again. Check slots 1–6 against two complete runs. When the team list changes, update the divisor and the choices for future slots and preserve already issued assignments.

Slot 4 minus 1 has remainder zero, so CHOOSE reads option 1, Blue.

Illustrated wraparound check.

Related Microsoft Excel reference