SOLVED

if 0 do nothing

Copper Contributor

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.

4 Replies

@Catherine440 

What does your formula currently look like?

@Hans Vogelaar 

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

best response confirmed by Hans Vogelaar (MVP)
Solution

@Catherine440 

A straight forward solution would be:

=IF(E9<25,0,E9-25)

A more advanced solution would be:

=MAX(0,E9-25)

 

that worked!!!! thank you
1 best response

Accepted Solutions
best response confirmed by Hans Vogelaar (MVP)
Solution

@Catherine440 

A straight forward solution would be:

=IF(E9<25,0,E9-25)

A more advanced solution would be:

=MAX(0,E9-25)

 

View solution in original post