+ Reply to Thread
Results 1 to 14 of 14

Combine SUMIFS INDEX MATCH and date range

  1. #1
    Registered User
    Join Date
    03-06-2023
    Location
    Lyon,France
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    9

    Combine SUMIFS INDEX MATCH and date range

    Hello Everyone,

    I've been working on a file whose goal is transform quarterly revenues and costs into annual ones.
    I've managed to do it thanks to INDIRECT and MATCH function but I wanted to try other (faster solutions):

    1. I tried INDEX MATCH but I get a Value error (cf cell K4 of the spreadsheet)
    2. I'd like to do it with SUMPRODUCT but do not where to begin with

    Thanks a lot for your help !


    PS: I'm not sure if I must create to separate posts since there are two questions, if so I will comply.
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,987

    Re: Combine SUMIFS INDEX MATCH and date range

    No need for two threads - we can deal with both issues here.

    Where shall I find the working formula with INDIRECT?
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    03-06-2023
    Location
    Lyon,France
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    9

    Re: Combine SUMIFS INDEX MATCH and date range

    Thanks for your reactivity!

    K4 should match with E4.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,987

    Re: Combine SUMIFS INDEX MATCH and date range

    Try this in D4 copied across and down:

    =LET(f,FILTER(Quarters!$D$4:$T$51,Quarters!$B$4:$B$51=Summary!$B4),s,FILTER(f,(Quarters!$D$2:$T$2<=Summary!D$2)*(Quarters!$D$2:$T$2>EOMONTH(EDATE(Summary!D$2,-12),0)+1)),SUM(s))
    Attached Files Attached Files
    Last edited by AliGW; 07-12-2023 at 07:09 AM. Reason: Workbook added.

  5. #5
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,917

    Re: Combine SUMIFS INDEX MATCH and date range

    The equivalent INDEX/MATCH for E4 would be:

    =SUMIFS(INDEX(Quarters!$E$1:$T$51,MATCH($B4,Quarters!$B$1:$B$51,0),0),Quarters!$E$2:$T$2,"<="&E$2,Quarters!$E$2:$T$2,">"&D$2)

    not sure why you'd want to use SUMPRODUCT instead?
    Rory

  6. #6
    Registered User
    Join Date
    03-06-2023
    Location
    Lyon,France
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    9

    Re: Combine SUMIFS INDEX MATCH and date range

    Thanks both for your answer, I used Rorya's solutions since I only needed to incorporate minor changes (now I understand how the whole thing is built and that you have to respect the table dimensions in the criteria range as well).

    Concerning SUMPRODUCT: this spreadsheet comes from a video on how to use the INDIRECT function, and a user commented that using SUMPRODUCT would have been faster.
    (I must confess that I'm a bit fascinated by the SUMPRODUCT function and the seemingly endless possibility to tweak it that I do not master at all).
    Last edited by TRF7; 07-12-2023 at 09:13 AM.

  7. #7
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,917

    Re: Combine SUMIFS INDEX MATCH and date range

    I don't believe SUMPRODUCT would be faster here, though there would be little difference given the size of the data ranges I suspect.

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,987

    Re: Combine SUMIFS INDEX MATCH and date range

    Glad to have helped.

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, if you have not already done so, you may not be aware that you can thank anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of all those who offered help.

  9. #9
    Registered User
    Join Date
    03-06-2023
    Location
    Lyon,France
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    9

    Re: Combine SUMIFS INDEX MATCH and date range

    Even though it would not be necessarily faster, how would it look like ?

    Thanks a lot
    Last edited by TRF7; 07-12-2023 at 09:19 AM.

  10. #10
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,917

    Re: Combine SUMIFS INDEX MATCH and date range

    One way would be:

    =SUMPRODUCT(INDEX(Quarters!$E$1:$T$51,MATCH($B4,Quarters!$B$1:$B$51,0),0)*(Quarters!$E$2:$T$2<=E$2)*(Quarters!$E$2:$T$2>D$2))

  11. #11
    Registered User
    Join Date
    03-06-2023
    Location
    Lyon,France
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    9

    Re: Combine SUMIFS INDEX MATCH and date range

    Thanks for your answer, it works perfectly !

  12. #12
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    Australia
    MS-Off Ver
    365 V2403 and WPS V2022
    Posts
    3,443

    Re: Combine SUMIFS INDEX MATCH and date range

    Worksheet or Tab name : Summary

    Cell D4 formula , Drag down and across H6

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

  13. #13
    Registered User
    Join Date
    03-06-2023
    Location
    Lyon,France
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    9

    Re: Combine SUMIFS INDEX MATCH and date range

    Thanks for the solution, a really quick one !

    (Some minor changes: (Quarters!$D$2:$T$2>C$2)*(Quarters!$D$2:$T$2<=D$2) => (Quarters!$D$2:$T$2>D$2)*(Quarters!$D$2:$T$2<=E$2)

  14. #14
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    Australia
    MS-Off Ver
    365 V2403 and WPS V2022
    Posts
    3,443

    Re: Combine SUMIFS INDEX MATCH and date range

    @TRF7 You're Welcome. Glad to help . Thank You for the feedback and rep.

+ 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. SUMIFS Index Match with a date range (or other Options)
    By ajbro in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-17-2023, 01:51 PM
  2. [SOLVED] Index,Match,Match based on date Range - error in some cells
    By jmont in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-26-2019, 04:47 AM
  3. Index Match to find match date to a range of dates
    By downcrusher in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-27-2017, 06:05 PM
  4. Replies: 10
    Last Post: 01-15-2017, 08:02 AM
  5. [SOLVED] Combine SUMIFS and INDEX MATCH - or an alternative that achieves the same...
    By STUARTXL in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-17-2016, 01:06 PM
  6. [SOLVED] INDEX date that MATCH on date range, MATCH code(string)
    By Dahlia in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-23-2014, 03:33 AM
  7. Replies: 3
    Last Post: 04-23-2013, 03:46 PM

Tags for this Thread

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