Thread: #DIV/0! error
View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Peo Sjoblom Peo Sjoblom is offline
external usenet poster
 
Posts: 3,268
Default #DIV/0! error

=SUMIF(C41:H41,"<"&99^99)


--


Regards,


Peo Sjoblom


"Curtis" wrote in message
...
Thanks

Is there a way to exclude cells with the #DIV/0! error when using the sum
function

example =SUM(C41:H41)

"Pete_UK" wrote:

You could do it this way:

=IF(SUMIF('Tech Ops Data Base 2007.xls'!TechallDate,C$36&$A37,'Tech
Ops Data Base 2007.xls'!salesWO)=0,"",SUMIF('Tech Ops Data Base
2007.xls'!TechallDate,C$36&$A37,'Tech Ops Data Base 2007.xls'!sales)/
SUMIF('Tech Ops Data Base 2007.xls'!TechallDate,C$36&$A37,'Tech Ops
Data Base 2007.xls'!salesWO)

i.e. if the denominator is zero then return a blank, otherwise do the
calculation. You can change the "" in the middle to 0 if you wish.

Another way would be to use:

=IF(ISERROR(your_formula),"",your_formula)

though this would trap all errors.

Hope this helps.

Pete

On Dec 7, 3:08 pm, Curtis wrote:
I am using the formula
=(SUMIF('Tech Ops Data Base 2007.xls'!TechallDate,C$36&$A37,'Tech Ops
Data
Base 2007.xls'!sales))/SUMIF('Tech Ops Data Base
2007.xls'!TechallDate,C$36&$A37,'Tech Ops Data Base 2007.xls'!salesWO)

However in some causes I am receiving the following error #DIV/0!. Is
there
anything I can do to the above formula to remove that error

thanks