SOLVED

if then formula help

Copper Contributor

Can anyone help me with a formula - here is my formula I am looking for..... If G41 is >90 but <120 then H37 = 2

 

I appreciate any assistance :) 

5 Replies
best response confirmed by JB_The_RV_Guy (Copper Contributor)
Solution

Hi,

 

You need to use IF function along with AND as follows:

=IF(AND(G41>90,G41<120),2,0)

 

Hope that helps

Thank you Sir, That did it!!!

 

Any chance you could help with another that is similar?

 

here is the formula I am looking for:

IF G41 IS >90 BUT <120 = $200 OR IF G41 IS >121 BUT <180 = $300 OR IF G41 IS >181 = $500

 

I so appreciate your help!

Hi,

 

Here's the formula:

=IF(AND(G41>=90,G41<=120),200,IF(AND(G41>=121,G41<=180),300,IF(G41>=181,500,0)))

 

Here's another one (Works in Excel 2019 and Office 365).

=IFS(AND(G41>=90,G41<=120),200,AND(G41>=121,G41<=180),300,G41>=181,500,TRUE,0)

 

Hope that helps

What if G41 >=120 and <=121?
Also, what if G41>=180 and <=181?
When G41 has a value of either 120.5 or 180.5, the formula absurdly returns 0. IF is misplaced. The data is tabular and needs an approximate match, such that VLOOKUP, INDEX-MATCH, or my favorite LOOKUP should return the sensible answer.
1 best response

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

Hi,

 

You need to use IF function along with AND as follows:

=IF(AND(G41>90,G41<120),2,0)

 

Hope that helps

View solution in original post