+ Reply to Thread
Results 1 to 5 of 5

SUMIFS and INDEX MATCH #VALUE error

Hybrid View

  1. #1
    Registered User
    Join Date
    03-31-2015
    Location
    Seattle USA
    MS-Off Ver
    2013
    Posts
    2

    SUMIFS and INDEX MATCH #VALUE error

    Hello Excel Experts:

    Both expressions below use INDEX MATCH. The SUMIF formula is working properly but I'm getting a #VALUE error messages with the SUMIFS formula.

    =SUMIF('CP Data'!B:B,Summary!E1,INDEX('CP Data'!1:1,MATCH(Summary!$B4,'CP Data'!1:1,0))) --------------> correct value
    .....................................=SUMIFS(INDEX('CP Data'!1:1,MATCH(Summary!$B4,'CP Data'!1:1,0)),'CP Data'!A:A,Summary!D1,'CP Data'!H:H,Summary!A4) -------------> #VALUE

    #VALUE indicates a data type error, but all of the expressions appear to evaluate properly including the Index Match which evaluates to the same value in both formulas: 'CP Data'!$K$1 so I'm not clear where the error is. Thanks for any help!

    Robert

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: SUMIFS and INDEX MATCH #VALUE error

    Surely it will not work

    In the below Index() output you Passed 1 row which consists multiple columns
    INDEX('CP Data'!1:1,

    Will result the placement in which column the match is found.
    MATCH(Summary!$B4,'CP Data'!1:1,0)

    Index(ResultingRng,Row,Column)

    I don't know what is the use of match here because your output range consist only one row and using match in row part is the error part.
    INDEX('CP Data'!1:1,MATCH(Summary!$B4,'CP Data'!1:1,0))

    This 'CP Data'!A:A will have 1048576 cell values but this 'CP Data'!1:1 will output 16384 values so the passed ranges are not equal in size


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Valued Forum Contributor
    Join Date
    11-22-2014
    Location
    Arizona, USA
    MS-Off Ver
    Office 365
    Posts
    973

    Re: SUMIFS and INDEX MATCH #VALUE error

    I am guessing your Index is causing this error (Focusing on a single row)... Post a sample data and write out what you expect this formula to evaluate and the expected results of your given data.
    -If you think you are done, Start over - ELeGault

  4. #4
    Registered User
    Join Date
    03-31-2015
    Location
    Seattle USA
    MS-Off Ver
    2013
    Posts
    2

    Re: SUMIFS and INDEX MATCH #VALUE error

    To clarify, the intent was to provide a dynamic reference to the column within the SUMIFS formula in case of a column position change. As noted below, the cause of the #VALUE error was the INDEX formula. It was only looking at the first row as opposed to the entire column. Here's the corrected version with 'CP Data'!$A:$AZ referencing the entire column and MATCH returning the specific column within the 'CP Data'!$A:$AZ array. Thanks very much!

    =SUMIFS(INDEX('CP Data'!$A:$AZ,0,MATCH(Summary!$B4,'CP Data'!$1:$1,0)),'CP Data'!$B:$B,Summary!C$1,'CP Data'!$I:$I,Summary!$A4)

  5. #5
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: SUMIFS and INDEX MATCH #VALUE error

    This was actually an intersting post.
    Worth explaining what was going on..

    Take the original sumif that works
    =SUMIF('CP Data'!B:B,Summary!E1,INDEX('CP Data'!1:1,MATCH(Summary!$B4,'CP Data'!1:1,0)))

    Let's just say that the MATCH function finds B4 in G1.
    G1 is th 7th cell in 1:1
    So Match returns 7
    =SUMIF('CP Data'!B:B,Summary!E1,INDEX('CP Data'!1:1,7))
    The 7th cell in 'CP Data'!1:1 is therefor G1

    So it becomes
    =SUMIF('CP Data'!B:B,Summary!E1,'CP Data'G1)

    Your Sum Range and Criteria Range are not the same dimensions.

    Normally, you want your Sum Range to be of equal size to the Criteria Range.
    However, Sumif does it's best to figure out that you meant for the sum range to be same dimensions as the criteria range.
    Completing the sumif as if you had provided the sum range in same demension as the criteria range.
    How or Why it does that, I'm not exaclty sure.


    That works in Sumif
    But it does NOT work in SumifS

    Sumifs actually requires the Sum Range to be of equal dimensions to all the Criteria Ranges.
    That is why it returned #Value! for the Sumifs.


    The solution as you found was to make the Index Range use the same number of rows as your criteria ranges.
    Last edited by Jonmo1; 04-01-2015 at 01:22 PM.

+ 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. [SOLVED] SUMIFS with AND & INDEX & MATCH
    By pdalal in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-29-2014, 02:30 PM
  2. [SOLVED] Sumifs/match/index?
    By mstoto in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 10-14-2014, 09:23 AM
  3. [SOLVED] Sumifs/Index/Match----Please fix
    By Paul Cherian in forum Excel General
    Replies: 11
    Last Post: 09-02-2014, 04:07 AM
  4. [SOLVED] Index/Match, SUMIFS or something else? NEED HELP!
    By MMLBaylor in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-20-2014, 11:52 AM
  5. SumIFS or Index Match Help
    By excelnovice936 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-25-2013, 12:08 AM

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