RANDBETWEEN - exclude previous cases
I am a researcher, and I run the same 20 subjects twice a day, once in the morning and once in the afternoon. I create my datasheet in Numbers and generate a random assignment for each subject out of a pool of 8: so my function in each cell is =RANDBETWEEN(1:8). My problem is that subjects cannot be given the same assignment twice in a day; so if one is assigned 4 in the morning, s/he cannot be 4 again in the afternoon (but can be any of the other 7 numbers, and it doesn't matter if other subjects take the same number). So ideally I would've needed a function like: =RANDBETWEEN(1:8, EXCLUDE C3) which obviously doesn't exist in Numbers or other spreadsheet apps I know of.
Can anyone help with a solution? A single cell function would be most useful, but if a number of cells have to be used then so be it. I have to print a LOT of these sheets, so I need something that self-monitors whether the numbers change for each subject (I can't keep checking and correcting myself).
Thanks so much!
Macbook Pro (2008), Mac OS X (10.5.7), Functions - RANDBETWEEN