View Single Post
  #8  
Old October 23rd, 2008, 08:38 PM posted to microsoft.public.excel.worksheet.functions
TomPl
external usenet poster
 
Posts: 239
Default How to omit blank cells when calculating weighted averages

The weighted average is achieved by multiplying the number of credits by the
grade for each class then adding the products together
"Sumproduct(B55,$B$2:$D$2)". If the value of a grade is zero then the
product is zero and does not affect the total.

The sum is then divided by the total number of credits excluding those
credits that have no grade "Sumproduct(--((B55)0),$B$2:$D$2)". The part
--((B55)0) creates a boolean 1/0 which is multiplied by the number of
credits to get the number of credit with a grade assigned.

It's just that simple.