Forum Discussion
Catherine440
Feb 07, 2024Copper Contributor
if 0 do nothing
What formula do I use for if 0 do nothing? I am counting inventory. My formula applied even if my count was 0 giving me final values that were negative. If the count is 0 then I don't want the formula to apply.
A straight forward solution would be:
=IF(E9<25,0,E9-25)
A more advanced solution would be:
=MAX(0,E9-25)
What does your formula currently look like?
- Catherine440Copper Contributor
basically it's E9-25 (the weight of a keg of beer minus the weight of the empty keg. So if E9 is 0 I end up with -25 but what I want is 0
- Detlef_LewinSilver Contributor
A straight forward solution would be:
=IF(E9<25,0,E9-25)
A more advanced solution would be:
=MAX(0,E9-25)