Hi,
Need some help with an if statement I am working on. Here are the conditions:
1) If A1 = NP then S
2) If A1 = PH and A2 = PD then P
3) If A1 = PH and A2 NOT PD then S
4) If A1 = PD then C
There are only three variables NP, PH,PD
An example:
Column A Column B
NP s
PH p
PD c
PD c
PD c
PH s
NP s
PH p
PD c
Currently I have:
=IF(A8="NP","s",IF(AND(A8="PH",A9="PD"),"p",IF(AND(A8="PH",OR(A9="PH",A9="NP")),"s",IF(A8="PD","c"))))
But I think there must be a better way to do it?
Any thoughts?
Cheers
Matt
Need some help with an if statement I am working on. Here are the conditions:
1) If A1 = NP then S
2) If A1 = PH and A2 = PD then P
3) If A1 = PH and A2 NOT PD then S
4) If A1 = PD then C
There are only three variables NP, PH,PD
An example:
Column A Column B
NP s
PH p
PD c
PD c
PD c
PH s
NP s
PH p
PD c
Currently I have:
=IF(A8="NP","s",IF(AND(A8="PH",A9="PD"),"p",IF(AND(A8="PH",OR(A9="PH",A9="NP")),"s",IF(A8="PD","c"))))
But I think there must be a better way to do it?
Any thoughts?
Cheers
Matt