Multiple respondent selection

I have a form where i am taking information about the family members through repeat group.
i am selecting a random person from the repeat group.

But i am trying to do is, if the selected person refuses to continue then select the 2nd person excluding the 1st person.

i was trying this from the (${random number} mod ${number of total persons in the family}) but number gets repeat for example if random number is 24 and total persons are 3 then mod will be 0, and now after refusing the person 24 mod 2 which is also 0 .

what should do in this scenario?

I suggest to use the logic provided here :