# IF Statement With Greater Than & Less Than

I’m currently attempting to create a formula that allows me to keep two “above or below a certain value” statements into a single formula. Right now I have the following, but I’m just not sure how to combine the two to make it correct in the formula column. I apologize if this is a simple fix, I’m just racking my brain on getting it to work and getting nowhere as I’ve never had to combine multiple statements in a single formula column before.

IF((MAX({SQFT Stamped Concrete} > 300, 5*{A}-300, 0))

IF((MAX({SQFT Stamped Concrete} < 300, 1200, 0))

Hi @Garfield !

These formulas are correct! What you want to do is combine the formulas into one statement.

If we think about the basis of the IF statement, we want to start with the rule following with a comma, stating if that rule is true, following with a comma, and then what happens if that rule is false.

I do not believe that you need the MAX statement either. That is used best with multiple number columns that you are comparing.

What I believe that your statement should be is the following:
IF({SQFT Stamped Concrete}>300, MINUS(MULTIPLY(5,{A}),300), 1200)

This statement says if the concrete is more than 300, multiply “a” by 5 than subtract 300, otherwise show 1200.

If you are using MAX to take the highest value from multiple columns that is where you would use the MAX function like the following:
IF(MAX({Number 1},{Number 2})>300,MINUS(MULTIPLY(5,{A}),300), 1200)

This statement says if the largest number between number column 1&2 is greater than 300, multiply “a” by 5 and then subtract 300, otherwise show 1200.

One more scenario (just in case I am reading this wrong), If you are using {a} as the answer to your first statement in the MAX statement, you will want to use this formula:
IF(MAX({Number 1},{Number 2})>300,MINUS(MULTIPLY(MAX({Number 1},{Number 2}),5),300), 1200)

This statement says if the largest number between number column 1&2 is greater than 300, multiply the largest value between Number 1&2 by 5 and then subtract 300, otherwise show 1200.

Hope this helps!

This definitely helped a ton. Greatly appreciated!

The only thing that I’m still trapped on is after I put in the formula (it works perfectly btw) is that any values I have as 0 in the connected columns show up as -300 in the formula column when I’m trying to get them to appear as 0 when there isn’t a value associated with it. Is that possible?

(again, thank you for the help)

1 Like

@Garfield

Since your conditions are mutually exclusive, here’s another way (is also works for your last comment):

`IF((MAX({SQFT Stamped Concrete} > 300, 5*{A}-300, 0)) + IF((MAX({SQFT Stamped Concrete} < 300, 1200, 0))`

1 Like

@JCorrell - For some reason its showing up with an error. I’m honestly pretty daft when it comes to these formulas, so I’m not sure if I’m doing something wrong on my end, but I just copy pasted what you have there.

@Garfield

LOL, I did the same and did not check your original syntax… this should work:
`IF(MAX({SQFT Stamped Concrete}) > 300, 5*{A} - 300, 0) + IF(MAX({SQFT Stamped Concrete}) < 300, 1200, 0)`