Hi,
Sorry if this has been posted before, first time poster.
I want to convert data from one way to another. Below are the examples:
ID Variable_A Variable_B Variable_C
1001 1
1002 2 5
1003 1 2
1004 2 3
1005 3 5 4
1006 1 2
1007 4
1008 5
1009 2 4
INTO:
ID Var_1 Var_2 Var_3 Var_4 Var_5
1001 1 0 0 0 0
1002 0 1 0 0 1
1003 1 1 0 0 0
1004 0 1 1 0 0
1005 0 0 1 1 1
1006 1 1 0 0 0
1007 0 0 0 1 0
1008 0 0 0 0 1
1009 0 1 0 1 0
If normally use this type of FORMULA:
=IF($B2=1,1,IF($C2=1,1,(IF($D2=1,1,0))))
Where B2 / C2 / D2 are the original data, but will have to copy this formula can change it for VARIABLE 2.
This isn't so much of a problem, until I have about 30 or MORE variables.
Is there anyway that this formula can be done quicker.
Thanks,
Descent73
Sorry if this has been posted before, first time poster.
I want to convert data from one way to another. Below are the examples:
ID Variable_A Variable_B Variable_C
1001 1
1002 2 5
1003 1 2
1004 2 3
1005 3 5 4
1006 1 2
1007 4
1008 5
1009 2 4
INTO:
ID Var_1 Var_2 Var_3 Var_4 Var_5
1001 1 0 0 0 0
1002 0 1 0 0 1
1003 1 1 0 0 0
1004 0 1 1 0 0
1005 0 0 1 1 1
1006 1 1 0 0 0
1007 0 0 0 1 0
1008 0 0 0 0 1
1009 0 1 0 1 0
If normally use this type of FORMULA:
=IF($B2=1,1,IF($C2=1,1,(IF($D2=1,1,0))))
Where B2 / C2 / D2 are the original data, but will have to copy this formula can change it for VARIABLE 2.
This isn't so much of a problem, until I have about 30 or MORE variables.
Is there anyway that this formula can be done quicker.
Thanks,
Descent73