View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Jim Thomlinson Jim Thomlinson is offline
external usenet poster
 
Posts: 5,939
Default Getting #DIV/0! error in excel

=if(SUM(F29:L29) = 0, 0,
((F29*$F$26)+(G29*$G$26)+(H29*$H$26)+(I29*$I$26)+( J29*$J$26)+(K29*$K$26)+(L29*$L$26))/((SUM(F29:L29))))

or since most of your brackets are unnecessary

=if(SUM(F29:L29) = 0, 0,
(F29*$F$26+G29*$G$26+H29*$H$26+I29*$I$26+J29*$J$26 +K29*$K$26+L29*$L$26)/SUM(F29:L29))

--
HTH...

Jim Thomlinson


"MetroTech Support" wrote:

I'm getting the #DIV/0! error in excel. I understand that it is because the
cell I am calculating on is blank, and that I need to use the "IF" statement.
However, my calculation is a long, complicated one and I can't figure out
where to put the "IF". (see below)
Help!

=((F29*$F$26)+(G29*$G$26)+(H29*$H$26)+(I29*$I$26)+ (J29*$J$26)+(K29*$K$26)+(L29*$L$26))/((SUM(F29:L29)))


(It is calculating the average of daily sales at different $ rates per
transaction, and I need to sum 5 of them per sales person)