Task
I am trying to recode a number of variables into 3 seperate variables, using nested IF statements. I have written the nested If statements together, and Excel has allowed me to enter it (i.e. hasn't thrown an error message out). The problem is that the formula is not working correctly, in that it is not reading the data correctly. The variables are not filling in as they should, i.e. Collision, for instance, should appear when the formula is applied, and so should personal injury event. However, only Slip Trip Fall is appearing.
Thus, imagine the dataset, column one being the data in raw form, and column two being what the formula is (incorrectly) creating. Column two should be 1, 3, 4, etc, in line with what the classification should be.
Column one
1
4
5
6
2
Col two
1
1
1
1
My code is:
=IF(ISNUMBER(MATCH(C6,{"Slip Trip Fall","Fall down Stairs","Knock, Trip or Fall within bus"},0)),"Slip Trip Fall",IF(ISNUMBER(MATCH(C6,{"Alighting incident","Boarding incident","Struck by object","Personal Injury Event","Wheelchair / Buggy incident"},0)),"Personal Injury Event",IF(ISNUMBER(MATCH(C6,{"Collision","Collision incident"},0)),"Personal Injury Event")))
and with ELSE statements (basically identical) =IF(ISNUMBER(MATCH(C6,{"Slip Trip Fall","Fall down Stairs","Knock, Trip or Fall within bus"},0)),"Slip Trip Fall",ELSEIF(ISNUMBER(MATCH(C6,{"Alighting incident","Boarding incident","Struck by object","Personal Injury Event","Wheelchair / Buggy incident"},0)),"Personal Injury Event",ELSEIF(ISNUMBER(MATCH(C6,{"Collision","Collision incident"},0)),"Personal Injury Event")))
Aucun commentaire:
Enregistrer un commentaire