I am running a small study that basically needs to match suitable people into pairs and assign them a pair number, so each can be assigned into group A or B. They basically need to be from the same Medical Clinic, same gender, and either between 70 and 80 or above 80 years of age.
I'm not sure if this is even possible with excel, but basically I have a sheet with a form that you enter the new participants information. I need a formula that basically checks these 3 criteria against previous entries to find someone who matches on all 3, then assign the same pair number. If it can't find a suitable match, it needs to assign a new pair number.
In the above sample data set, I want I3 to realise that C3, D3 and E3 all match C2, D2 and E2, then put a 1 in I3.
Then for I4, it would assign a 2 as it doesn't match any entries above it. Same for I5. Then I6 would realise the match in I4 and put a 2.
Not sure if this makes sense. Also there can't be more than 2 of each pair #, but I can deal with that after I am able to get the numbers generating.
Aucun commentaire:
Enregistrer un commentaire