Young_workinprogress
New Member
- Joined
- Jun 27, 2013
- Messages
- 6
Hello All, I have what I think may be a "simple" IF statement function, but I'm having trouble ensuring the "variable" can be randomaly assigned" to a category (depending on the results of the IF statement). So if you take a look below I'll try to explain. I have a set of survey respondents. The respondents could me a member of 1, 2, or 3 organizations. For analysis purposes, I need to treat each respondent as if they only belong to one organization; So if a person happens to belong to 2 organizations, I want to "randomly" assign them to only one group in which they belong and analyze their data accordingly. For Example,
[TABLE="width: 500"]
<tbody>[TR]
[TD]Respondent ID[/TD]
[TD]Org 1[/TD]
[TD]Org 2[/TD]
[TD]Org 3[/TD]
[TD]Additional Info[/TD]
[/TR]
[TR]
[TD]123[/TD]
[TD]Yes[/TD]
[TD]No[/TD]
[TD]Yes[/TD]
[TD]abc[/TD]
[/TR]
[TR]
[TD]321[/TD]
[TD]No [/TD]
[TD]Yes[/TD]
[TD]Yes[/TD]
[TD]cda[/TD]
[/TR]
[TR]
[TD]432[/TD]
[TD]Yes [/TD]
[TD]Yes[/TD]
[TD]Yes[/TD]
[TD]xyz[/TD]
[/TR]
[TR]
[TD]532[/TD]
[TD]Yes[/TD]
[TD]No [/TD]
[TD]No[/TD]
[TD]zyx[/TD]
[/TR]
</tbody>[/TABLE]
I want to ensure that the respondent is "randomly" assigned to one of the organizations, but the respondent must actually belong to that organization before being assigned to it.
Logic: Look at respondent 1, check what organizations they belong to, randomly assign the respondent to only 1 organization. **A bonus would be to transfer all the respondent's additional info (in that row) to the new sheet/row/column. ** NOT a necessity though
[TABLE="width: 500"]
<tbody>[TR]
[TD]Respondent ID[/TD]
[TD]Org 1[/TD]
[TD]Org 2[/TD]
[TD]Org 3[/TD]
[TD]Additional Info[/TD]
[/TR]
[TR]
[TD]123[/TD]
[TD]Yes[/TD]
[TD]No[/TD]
[TD]Yes[/TD]
[TD]abc[/TD]
[/TR]
[TR]
[TD]321[/TD]
[TD]No [/TD]
[TD]Yes[/TD]
[TD]Yes[/TD]
[TD]cda[/TD]
[/TR]
[TR]
[TD]432[/TD]
[TD]Yes [/TD]
[TD]Yes[/TD]
[TD]Yes[/TD]
[TD]xyz[/TD]
[/TR]
[TR]
[TD]532[/TD]
[TD]Yes[/TD]
[TD]No [/TD]
[TD]No[/TD]
[TD]zyx[/TD]
[/TR]
</tbody>[/TABLE]
I want to ensure that the respondent is "randomly" assigned to one of the organizations, but the respondent must actually belong to that organization before being assigned to it.
Logic: Look at respondent 1, check what organizations they belong to, randomly assign the respondent to only 1 organization. **A bonus would be to transfer all the respondent's additional info (in that row) to the new sheet/row/column. ** NOT a necessity though