+ Reply to Thread
Results 1 to 8 of 8

Dynamic cumulative SUM RANGE - different months

  1. #1
    Registered User
    Join Date
    12-13-2013
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    10

    Dynamic cumulative SUM RANGE - different months

    I'm opening this thread on the advice from Pepe Le Mokko.
    Please, also refer to this thread: Dynamic SUMIF(S) "sum range"

    Hi again guys,

    Now I'm trying to improve the functionality of the file attached above.
    I've attached the file again with another drop-down menu. What I'm trying to do is to have a sum of
    all the months between the two months indicated in the drop down menu.
    For example by picking two months from the drop down menus, I want to know the sum of the values between Jan-Mar (Jan, Feb and Mar), or for example Jul-Oct (Jul,Aug,Sep and Oct)...

    I've tried to combine SUMPRODUCT with INDEX and MATCH but it doesn't work.

    I want to build upon this formula:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Any ideas?...

    IMPORTANT: Thanks to Debraj Roy for the quick reply, but I forgot to mention that I have multiple strings (column E) which are NOT unique. Basically "VLOOKUP way" won't help me, rather it should be "SUMIF way".

    In the attached file I've added one additional row (r19), which is the same as r18, just to try how the summing will work.
    Attached Files Attached Files
    Last edited by epsiloni; 12-15-2013 at 05:22 AM.

  2. #2
    Valued Forum Contributor xlbiznes's Avatar
    Join Date
    02-22-2013
    Location
    Bahrain
    MS-Off Ver
    Excel 2007
    Posts
    1,223

    Re: Dynamic cumulative SUM RANGE - different months

    Hi,

    try this :

    Please Login or Register  to view this content.
    Happy Computing ,

    Xlbiznes.

    To show your appreciation please click *

  3. #3
    Registered User
    Join Date
    12-13-2013
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Dynamic cumulative SUM RANGE - different months

    Unfortunately, it doesn't work. I want to encompass all the area at one, I don't want to make SUMIFS for only 1 row, because my table has approx 2000 rows, and strings in column E, repeat each other multiple times.
    Basically assume that the strings in column S are unique ones, that sum all the strings in column E.
    You'll see that if you sum Jan-Apr, it will not match with the result from the formula.

  4. #4
    Forum Expert Debraj Roy's Avatar
    Join Date
    09-27-2012
    Location
    New Delhi,India
    MS-Off Ver
    Excel 2013
    Posts
    1,469

    Re: Dynamic cumulative SUM RANGE - different months

    Hi,, Me agian..

    try this..

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Regards!
    =DEC2HEX(3563)

    If you like someone's answer, click the star to give them a reputation point for that answer...

  5. #5
    Registered User
    Join Date
    12-13-2013
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Dynamic cumulative SUM RANGE - different months

    It gives me zeros everywhere...

  6. #6
    Forum Expert Debraj Roy's Avatar
    Join Date
    09-27-2012
    Location
    New Delhi,India
    MS-Off Ver
    Excel 2013
    Posts
    1,469

    Re: Dynamic cumulative SUM RANGE - different months

    OOPS.. Lets try another one..

    =SUMPRODUCT(($E$4:$E$40=S4)*(MONTH($F$2:$Q$2)>=MONTH($T$2))*(MONTH($F$2:$Q$2)<=MONTH($V$2)),$F$4:$Q$40)


    PS: with a exception.. start date should be less than end date..

  7. #7
    Registered User
    Join Date
    12-13-2013
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Dynamic cumulative SUM RANGE - different months

    Very elegant solution. Thanks for the help Debraj Roy. I reputation for you!

    Thanks for all the guys that participated.

  8. #8
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    Office 2021
    Posts
    2,237

    Re: Dynamic cumulative SUM RANGE - different months

    Since you have 1st day of each month in F2:Q2, instead of MONTH in Deb's formula, can use simply to >=T2, <=V2

    =SUMPRODUCT((E$4:E$40=S4)*(F$2:Q$2>=T$2)*(F$2:Q$2<=V$2),F$4:Q$40)
    Regards,
    Haseeb Avarakkan

    __________________________________
    "Feedback is the breakfast of champions"

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 8
    Last Post: 12-06-2013, 01:42 PM
  2. dynamic pivot on months
    By masond3 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-11-2012, 12:42 PM
  3. Cumulative total on months by Agent
    By jayjaysb in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 11-28-2011, 07:09 PM
  4. Cumulative months between dates
    By jpg1982 in forum Excel General
    Replies: 2
    Last Post: 02-19-2009, 03:33 PM
  5. [SOLVED] How do I create a dynamic series of months in excel?
    By TNH in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-17-2006, 11:30 AM

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