View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ashish Mathur[_2_] Ashish Mathur[_2_] is offline
external usenet poster
 
Posts: 1,766
Default Average using Sumproduct

Hi,

Try this

=SUMPRODUCT(('East 2010'!$D$3:$D$11)*('East 2010'!$G$3:$G$11="THR")*('East
2010'!$E$3:$E$11="Male")*('East
2010'!$F$3:$F$11<=DATE(2010,3,31)))/SUMPRODUCT(('East
2010'!$G$3:$G$11="THR")*('East 2010'!$E$3:$E$11="Male")*('East
2010'!$F$3:$F$11<=DATE(2010,3,31)))

--
Regards,

Ashish Mathur
Microsoft Excel MVP

"Basenji" wrote in message
...
Using Excel 2003, I need to find the average age of males who have had a
specified procedure before March 31, 2010. D3:D11 are ages. E3:E11 are
gender. F3:F11 are the dates. G3:G11 are the procedures. So far I have
this
formula but am getting a total of the ages rather than the average.
=AVERAGE((SUMPRODUCT(('East 2010'!$D$3:$D$11)*('East
2010'!$G$3:$G$11="THR")*('East 2010'!$E$3:$E$11="Male")*('East
2010'!$F$3:$F$11<=DATE(2010,3,31)))))

Any suggestions would be appreciated. Thank you.