Thread: formula help
View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.misc
mmb mmb is offline
external usenet poster
 
Posts: 17
Default formula help

Dave, Thank you as well.

"Dave" wrote:

Hi,
I think he wants month and year:
=SUMPRODUCT((A2:A22=366)*(AND(MONTH(B2:B22)=3,YEAR (B2:B22)=2008))*C2:C22)

If you want to use cell references for the 2 criteria, eg Cost# in E1, Date
in F1:
=SUMPRODUCT(--(A1:A9=E1)*(AND(MONTH(B1:B9)=MONTH(F1),YEAR(B1:B9) =YEAR(F1)))*(C1:C9))
F1 requires full date. eg, for March 2008, enter 3/1/2008

Regards - Dave


"Don Guillett" wrote:

try this

=SUMPRODUCT((A2:A22=366)*(MONTH(B2:B22)=3)*C2:C22)

--
Don Guillett
Microsoft MVP Excel
SalesAid Software