SOLVED

IF Function

Copper Contributor

How would I use the IF function or any other function to make the response acid (<7.35) Neutral (7.35-7.45) and Alkaline (>7.45)?

 

 

7 Replies
best response confirmed by Safi23 (Copper Contributor)
Solution

@Safi23 

Let's say the number is in A2.

In another cell, say B2:

 

=IF(A2="","",IF(A2<7.35,"Acid",IF(A2<=7.45,"Neutral","Alkaline")))

 

This can be filled down if required.

@Safi23 As a variant:

=LOOKUP(A2,{0,7.35,7.450001},{"Acid","Neutral","Alkaline"})

 

Thank you so much! you saved me so much time!
If C8 shows 'Macrocytic' for example and C9 shows 'Hyperchromic' how would I make C10 say 'Iron deficiency' ? and then change depending on the word combinations?

@Safi23

 

=IF(AND(C8="Macrocytic",C9= "Hyperchromic"), "Iron Deficiency", IF(AND(C8="...", C9="..."), "...", "..."))

 

But if you have many combinations, it would be better to create a lookup table. We'd need to have detailed information if you want help with that.

@Hans Vogelaar 

 

I think a lookup table would be best

 

@Safi23 

In C10, confirmed with Ctrl+Shift+Enter:

 

=INDEX(Sheet2!$C$2:$C$6,MATCH(1,(Sheet2!$A$2:$A$6=C8)*(Sheet2!$B$2:$B$6=C9),0))

1 best response

Accepted Solutions
best response confirmed by Safi23 (Copper Contributor)
Solution

@Safi23 

Let's say the number is in A2.

In another cell, say B2:

 

=IF(A2="","",IF(A2<7.35,"Acid",IF(A2<=7.45,"Neutral","Alkaline")))

 

This can be filled down if required.

View solution in original post