Jun 11 2022 04:10 AM
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 anemia 1 = presence of anemia
However for male patients, a patient is considered anemic if hemoglobin < 14 for males and hemoglobin < 12 for females
Could somebody please help me put a function that automatically fills 1 or 0 s (for anemia or absence of anemia)
Using a nested IF formula, I have tried many times but with syntax errors, could somebody help me please find a working function ?
Any help is appreciated,
Thank you Joe
PS : My experience with excel is pretty limited
Jun 11 2022 04:18 AM
SolutionLet'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)
Jun 11 2022 06:25 AM
Jun 11 2022 04:18 AM
SolutionLet'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)