Ask Your Question
0

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

asked 2019-07-03 11:21:01 +0200

CSTIG gravatar image

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.

edit retag flag offensive close merge delete

Comments

2

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

Your total function should be simply

=MAX(H3-H4;5)
Mike Kaganski gravatar imageMike Kaganski ( 2019-07-03 11:42:11 +0200 )edit

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

m.a.riosv gravatar imagem.a.riosv ( 2019-07-03 22:33:29 +0200 )edit

@m.a.riosv: well - I didn't directly answered the asked question ("How to use Greater Than and Less Than") :-)

Mike Kaganski gravatar imageMike Kaganski ( 2019-07-03 22:35:06 +0200 )edit

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.

m.a.riosv gravatar imagem.a.riosv ( 2019-07-03 22:44:12 +0200 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2019-07-03 16:09:50 +0200

CSTIG gravatar image

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

edit flag offensive delete link more

Comments

Please use the comments or edit your question.

m.a.riosv gravatar imagem.a.riosv ( 2019-07-03 22:30:58 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2019-07-03 11:21:01 +0200

Seen: 37 times

Last updated: Jul 03