View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Toppers Toppers is offline
external usenet poster
 
Posts: 4,339
Default sumproduct with dates


with year in C1 i.e. 2005:

=SUMPRODUCT(--(MONTH(A1:A5)3),--(YEAR(A1:A5)=C1),(B1:B5))+SUMPRODUCT(--(MONTH(A1:A5)=3),--(YEAR(A1:A5)=C1+1),(B1:B5))

HTH

"Bumblebee" wrote:

I have a quarterly time series and I always want to sum the last three
quartes of a year and the first of the next year and I can't think of a
simple way to do it.
e.g.
A B
31/3/2005 1000
30/6/2005 3500
30/9/2005 6790
31/12/2005 8000
31/3/2006 9000

So I would want to add quarters 6, 9 and 12 of 2005 and 3 of 2006 in this
case but in general quarters 6, 9, 12 of year xxxx and 3 of year xxxx+1