How to use Greater Than and Less Than to Prevent or Allow Equations

I’ll do my best to explain what I mean.

=IF(H3**>**H4,H3-H4) This formula works as intended and lets me easily subtract the values in H3 and H4.

The issue is if I add, IF(H3**<**H4,H3-H4) I still need the values to subtract, but I don’t want the values to go below 5 or into the negatives.

So I’m not sure how to set a minimum, I assume it is MIN(), but then I’m not certain on how to set up multiple functions together since my previous attempts to do so didn’t work too well.

If H3<=H4, it’s known that H3-H4 is 0 or negative.

Your total function should be simply


Hi @Mike2 IMHO why not put answers as Answer, it lets to mark them as correct, it’s how Ask works, I think.

@mariosv: well - I didn’t directly answered the asked question (“How to use Greater Than and Less Than”) :slight_smile:

I think it’s not only a matter of solving directly the question, but to give the questioners a way to get it solved, or where to search for a solution. But show them how to do it, alternatives, not a solution as a gift.

Thank you, @mikekaganski. Just using =MAX gives me what I need, instead of trying to use > or <.

Please use the comments or edit your question.