Not sure if this is exactly what you want because your SUMIF refers to
P8:P501 and your SUMPRODUCT does not but this might get you there,
=SUMPRODUCT(--(S8:S501="Yes"),--(B8:B501<""),P8:P501)/COUNTIF(B8:B501,B8:B501&"")
HTH
Steve
--
SteveG
------------------------------------------------------------------------
SteveG's Profile:
http://www.excelforum.com/member.php...fo&userid=7571
View this thread:
http://www.excelforum.com/showthread...hreadid=554978