 • 666K Members
• 9,792 Online
• 819K Conversations
SOLVED

Highlighted

# if then formula help

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
Highlighted
Solution

# Re: if then formula help

Hi,

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

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

Hope that helps

Highlighted

# Re: if then formula help

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

Highlighted

# Re: if then formula 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

Highlighted

# Re: if then formula help

What if G41 >=120 and <=121?
Also, what if G41>=180 and <=181?
Highlighted

# Re: if then formula help

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.