+ Reply to Thread
Results 1 to 5 of 5

Sumproduct of shifting array with a left boundary

  1. #1
    Registered User
    Join Date
    03-27-2013
    Location
    New York
    MS-Off Ver
    Excel 2010
    Posts
    20

    Sumproduct of shifting array with a left boundary

    So I have dates at the top

    have a line that needs to check if month = 11 and then sum the array of the last 12 months.

    Having trouble with the leftmost boundary, as explained on sheet.

    Thank you!!
    Attached Files Attached Files

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Sumproduct of shifting array with a left boundary

    In B8 and copy across??

    =IF(MONTH(B2)=11,SUM(A$3:$B6),"-")
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Sumproduct of shifting array with a left boundary

    hi svalentine91, if you have more than 12 months, then 1 way:
    =IF(MONTH(B2)=11,SUM(OFFSET(A3,,,4,-MIN(12,COLUMNS($A3:A3)))),0)

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  4. #4
    Registered User
    Join Date
    03-27-2013
    Location
    New York
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: Sumproduct of shifting array with a left boundary

    Thanks for the reply, but looking back I was not clear enough. I have a model that changes; When I enter a specific date, say 01/01/2013, Case 1 will be returned, albeit continuing on into future years

    If I was to enter 08/01/2013, case 2 would occur, once again to an nth date.

    Now, the first column, column B will change, and sometimes there will not be data for the last 12 months.(In case 1 there are only 10 months of data, in case 2, only 3 months)

    my question is to find the sumproduct formula that would fulfill the given requirements, finding the sum of the data in the number of months, max 12 until it hits the leftmost boundary.

  5. #5
    Registered User
    Join Date
    03-27-2013
    Location
    New York
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: Sumproduct of shifting array with a left boundary

    Quote Originally Posted by benishiryo View Post
    hi svalentine91, if you have more than 12 months, then 1 way:
    =IF(MONTH(B2)=11,SUM(OFFSET(A3,,,4,-MIN(12,COLUMNS($A3:A3)))),0)
    thank you very much
    Last edited by svalentine91; 05-07-2013 at 11:56 AM.

+ 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