Forum Discussion
joecooper13
Jun 11, 2022Copper Contributor
Nested if function
Hello I am doing an excel sheet to collect data, I want to put 3 cells One containing patient's sex : 0 male 1 female One containing hemoglobin level : eg 12 One containing anemia : 0 = no anem...
- Jun 11, 2022
Let's say Patient Sex is in B2 and down, and Hemoglobin Level is in C2 and down.
The formula for Anemia in row 2 would be
=IF(OR(AND(B2=0,C2<14),AND(B2=1,C2<12),1,0)
or
=IF(C2<IF(B2=0,14,12),1,0)
HansVogelaar
Jun 11, 2022MVP
Let's say Patient Sex is in B2 and down, and Hemoglobin Level is in C2 and down.
The formula for Anemia in row 2 would be
=IF(OR(AND(B2=0,C2<14),AND(B2=1,C2<12),1,0)
or
=IF(C2<IF(B2=0,14,12),1,0)
- joecooper13Jun 11, 2022Copper ContributorThis formula worked :
=IF(C2<IF(B2=0,14,12),1,0)
The other didn't
Thank you a lot Hans ✌🏻✌🏻✌🏻- SergeiBaklanJun 11, 2022Diamond Contributor
- joecooper13Jun 11, 2022Copper ContributorOkay, thank you Sergei 🙌🏻