+ Reply to Thread
Results 1 to 8 of 8

SUMIF function combined with INDEX/MATCH

  1. #1
    Registered User
    Join Date
    01-26-2015
    Location
    Australia
    MS-Off Ver
    2010
    Posts
    4

    SUMIF function combined with INDEX/MATCH

    Hi,

    Im wondering if there is a way to do the following;

    In the attached sheet, I would like to be able to select a certain "Type" in column A e.g. AB2, and then in that particular row I would like to sum all values between a certain date range e.g. from Sep-14 to Nov-14, to give a total of 577 in this example.

    I can do a SUMIFS with INDEX and MATCH to pick up a particular cell for a two way lookup, but cant seem to work out how to sum a range of the row values depending on the date range.

    Is there a way of doing this?

    Thanks
    Nicki
    Attached Files Attached Files

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: SUMIF function combined with INDEX/MATCH

    Hi, welcome to the forum

    Try this...
    =SUMPRODUCT(($A$2:$A$4=$K$4)*($B$1:$G$1>=$K$1)*($B$1:$G$1<=$K$2)*($B$2:$G$4))
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    01-26-2015
    Location
    Australia
    MS-Off Ver
    2010
    Posts
    4

    Re: SUMIF function combined with INDEX/MATCH

    Awesome! that works perfectly!

    Thanks so much

    Nicki

  4. #4
    Registered User
    Join Date
    01-26-2015
    Location
    Australia
    MS-Off Ver
    2010
    Posts
    4

    Re: SUMIF function combined with INDEX/MATCH

    Hi FDibbins,

    I used your formula and it worked great in my test data. But when i put it into production I get an error saying "Excel ran out of resources while attempting to calculate one or more formula. As a result, these formula's cannot be evaluated."

    I assume this is because the data is too large for the SUMPRODUCT formula. Is there another formula I can use to get the same result?

    Thanks
    Nicki

  5. #5
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: SUMIF function combined with INDEX/MATCH

    What is the exact formula you used? SUMPRODUCT funstion can be quite "resource hungry" if you apply it to large ranges (e.g. whole columns). Can you apply the formula to a more restrictive range of data?
    Audere est facere

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: SUMIF function combined with INDEX/MATCH

    Agree with DDL there. Did you by any chance change the ranges from defined ranges ($A$2:$A$4) to column ranges (A:A)? If so, that is probably the cause of your problem. Try and restrict the range

  7. #7
    Registered User
    Join Date
    01-26-2015
    Location
    Australia
    MS-Off Ver
    2010
    Posts
    4

    Re: SUMIF function combined with INDEX/MATCH

    Thanks to both of you. The issue definitely was the range. I had selected a whole column at the start of my formula. When i restricted the range it worked perfectly.

    Cheers :-)
    Nicki

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: SUMIF function combined with INDEX/MATCH

    Happy to help and thanks for the feedback

+ 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. VBA Combined CountIf & SumIf On Match
    By hobbiton73 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-28-2014, 12:00 PM
  2. Vlookup/Match/Index combined with IF function to return 2nd to last result
    By Ollypetcon in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-23-2014, 07:54 AM
  3. SumIf combined with Isnumber or Match?
    By hunt0035 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-25-2012, 03:29 PM
  4. Sumif, index and match function
    By ronlau123 in forum Excel General
    Replies: 2
    Last Post: 07-06-2011, 05:27 AM
  5. Sumif combined with MATCH - Help Sought
    By David Brown in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-09-2010, 01:41 PM

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