= 2 or > than

  • Thread starter Thread starter **{Steven}**
  • Start date Start date
S

**{Steven}**

How do I have a formula check to see if a sum is equal to or greater than a
set value? I am trying to do something like

=IF(U42+U43)is equal to or greater than U45,0,U45-sum(u42:u43)

Thanks In Advance

Steven Connor
 
Never mind, I got the equation. It is

=IF(U42+U43>=U45,0,U45-SUM(U42:U43))

I still have my little problem but at least I am one step closer to
resolving it.

Thanks Anyway

Steven C :-)
 
I am not familiar with MAX, would you please explain how this works the same
as the equation I used? I always like to learn new things.

Thanks

Steven
 
This portion of your formula:

U42+U43>=U45
is the same as:
0>=u45-u42-u43
(just subtract U42 (and then U43) from both sides of the inequality.

So you're writing if that expression (u45-u42-u43) is negative, return 0.

Harald's expression uses =MAX() to do the same thing.

=Max() returns the biggest of the arguments in the function:
=max(3,1883) returns 1883.
=max(0,-23) returns 0.

So Harald is doing the subtraction and letting =Max() do the comparison.
 
But you have 3 numbers and you're doing (essentially) a subtraction.

Checking to see if
3+8>=9
is equivalent to checking
0>=9-3-8
or
0>=-2
 
But that is what I was saying, I never return a 0. The values are always in
the thousands. Returning a 0 would screw everything up. Besides, I got it
working. Thanks anyway.
 
**{Steven}** said:
But that is what I was saying, I never return a 0. The values are always in
the thousands. Returning a 0 would screw everything up. Besides, I got it
working. Thanks anyway.

I don't get this. Your original formula says
=IF(U42+U43>=U45,0,
But whatever. You got it working. Thanks for the feedback.
 
You may try the following:
=If((U42+U43)>=U45,0,U45-sum(U42:U43))
or
=If((U42+U43)>=U45,0,U45-(U42+U43))

Eechhutti R.Rajasekaran
 
Back
Top