Thread: Returning Zero
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Silvercreek Silvercreek is offline
external usenet poster
 
Posts: 4
Default Returning Zero

This works for empty or zero cells, in Excel, that would return a positive
when subtracted from a positive cell, but not when positive cells are
subtracted from zero or empty. Can this be tweaked a bit?
Thanks for your help
--
Silvercreek


"Bob Phillips" wrote:

=IF(OR(A12=0,B12=0),0,MAX(A12-B12,0))

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Silvercreek" wrote in message
...
I use the MAX command for negative numbers when a positive number is
subtracted from zero or empty cells, returning a negative number, but that
does not work when subtracting zero or empty cells from a positive cell.

Is
there a formula that will return a zero if either of the values in any of

the
cells being subtracted is empty or a formula that would cover both

situations?
Thanks
--
Silvercreek