SOLVED

Excel

Copper Contributor

I want to compare multiple cells. If H4 has the letter Y, then I want B4 to have the number 71 or if C4<1, then return 71, if C4 equals 1 then return 31 or if C4 is greater than 1 return 1 in B4. 

 

Here is the formula I tried using and it is not working:

=IF(OR(H4=Y, "71",IF(C4<1,"71",IF(C4=1,"31",IF(C4>1,"1")))))

 

Any help is greatly appreciated.

4 Replies

Consider the OR(H4="Y",C4<1) this way

or 


=IF((H4="Y")+(C4<1),71,IF(C4=1,31,1))

 

=IF((H4="Y")+(C4<1),71,IF(C4=1,31,1))

 

 

best response confirmed by allyreckerman (Microsoft)
Solution

@SAIKEN140 Perhaps like this:

=IF(OR(H4="Y",C4<1),71,IF(C4=1,31,1))

@SAIKEN140 

In B4:

 

=IF(OR(H4="Y",C4<1),71,IF(C4=1,31,1))

Thank you! This works for what I needed!
1 best response

Accepted Solutions
best response confirmed by allyreckerman (Microsoft)
Solution

@SAIKEN140 Perhaps like this:

=IF(OR(H4="Y",C4<1),71,IF(C4=1,31,1))

View solution in original post