View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Harlan Grove[_2_] Harlan Grove[_2_] is offline
external usenet poster
 
Posts: 1,231
Default How to sum by month

"Matt's Dad" wrote...
....
=SUMPRODUCT(--(B$1=($B$8:$B$24)),--(DATE(YEAR(B$1),MONTH(B$1),1)<=($B$8:$B$24)),
--($A2=($A$8:$A$24)),$C$8:$C$24)

....

You could replace the first 2 terms with

--(TEXT(B$1,"YYYYMM")=TEXT($B$8:$B$24,"YYYYMM"))