+ Reply to Thread
Results 1 to 3 of 3

sumproduct with dates

  1. #1
    Bumblebee
    Guest

    sumproduct with dates

    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

  2. #2
    Toppers
    Guest

    RE: 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


  3. #3
    Bumblebee
    Guest

    RE: sumproduct with dates

    thank you, it worked

    "Toppers" wrote:

    >
    > 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


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1