+ Reply to Thread
Results 1 to 6 of 6

Sum of multiple index/match results

  1. #1
    Registered User
    Join Date
    06-25-2015
    Location
    Virginia
    MS-Off Ver
    2013
    Posts
    3

    Sum of multiple index/match results

    Hi, I am trying to compile financial statements and am trying to put together a formula to pull account numbers into their proper reporting lines and years. Currently, I am just adding up multiple index/match formulas with a "+" between them. Is there a way to use a single index/match as an array to sum up all of the results from various lookup values? Here is an example of one of the formulas:

    =(IFERROR(INDEX(Sheet2!$A$1:$AG$500,MATCH($A5, Sheet2!$C$1:$C$509,0),MATCH(C$1, Sheet2!$A$1:$AG$1,0)),0))+(IFERROR(INDEX(Sheet2!$A$1:$AG$500,MATCH($B5, Sheet2!$C$1:$C$509,0),MATCH(C$1, Sheet2!$A$1:$AG$1,0)),0))+(IFERROR(INDEX(Sheet2!$A$1:$AG$500,MATCH($A5, Sheet2!$C$1:$C$509,0),MATCH(B$1, Sheet2!$A$1:$AG$1,0)),0))+(IFERROR(INDEX(Sheet2!$A$1:$AG$500,MATCH($B5, Sheet2!$C$1:$C$509,0),MATCH(B$1, Sheet2!$A$1:$AG$1,0)),0))

    As you can see, this is rather unwieldy and that is one of the shorter examples. I have also attached a sample of the data. Thanks in advance for any help. Sample data.xlsx
    Last edited by kawaik; 06-25-2015 at 09:14 PM.

  2. #2
    Forum Contributor
    Join Date
    07-24-2009
    Location
    Valrico, FL USA
    MS-Off Ver
    Excel 2016
    Posts
    358

    Re: Sum of multiple index/match results

    Try the formula below in cell L4, then copy and paste to see if this does what you want.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  3. #3
    Valued Forum Contributor quekbc's Avatar
    Join Date
    01-18-2010
    Location
    Sydney, Australia
    MS-Off Ver
    2010, 2013, 2016
    Posts
    1,149

    Re: Sum of multiple index/match results

    Hi kawaik

    You could use an array formula such as this

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


    It can be further simplified if the year periods between the data and the financials are the same (i.e. 2011 to 2015 for both data and financials)

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


    I've put these formulae into the attached file.

    NOTE: As this is an array formula, remember to press and hold CTRL and SHIFT before hitting ENTER. (i.e. type formula, hold CTRL SHIFT, hit ENTER)
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    06-25-2015
    Location
    Virginia
    MS-Off Ver
    2013
    Posts
    3

    Re: Sum of multiple index/match results

    The array formula here does the trick. Unfortunately I do have to match the years because of the formatting on the financials themselves. Thanks for the help quekbc and ncmay.

  5. #5
    Registered User
    Join Date
    06-25-2015
    Location
    Virginia
    MS-Off Ver
    2013
    Posts
    3

    Re: Sum of multiple index/match results

    Quote Originally Posted by quekbc View Post
    Hi kawaik

    You could use an array formula such as this

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


    It can be further simplified if the year periods between the data and the financials are the same (i.e. 2011 to 2015 for both data and financials)

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


    I've put these formulae into the attached file.

    NOTE: As this is an array formula, remember to press and hold CTRL and SHIFT before hitting ENTER. (i.e. type formula, hold CTRL SHIFT, hit ENTER)


    Just out of curiosity, what causes the index(match()) in the first formula to return a cell reference instead of a value?

  6. #6
    Valued Forum Contributor quekbc's Avatar
    Join Date
    01-18-2010
    Location
    Sydney, Australia
    MS-Off Ver
    2010, 2013, 2016
    Posts
    1,149

    Re: Sum of multiple index/match results

    Quote Originally Posted by kawaik View Post
    Just out of curiosity, what causes the index(match()) in the first formula to return a cell reference instead of a value?
    I don't know exactly apart from that's how it's programmed into Excel. There are a few functions in Excel that returns the "reference" rather than the value. This info can be found in Excel Help (F1). For example, the first sentence for INDEX function is "Returns a value or the reference to a value from within a table or range."

    As such, you can do references like A1:INDEX(B1:Z1,10)

    A few other functions that returns the cell reference are INDIRECT and OFFSET.

+ 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] Index, Match, Multiple Results
    By ecorf in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-28-2013, 11:37 AM
  2. Index/Match with multiple results
    By kwadjo in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-26-2013, 04:05 PM
  3. Index/Match with multiple results
    By amcghee1 in forum Excel General
    Replies: 4
    Last Post: 10-18-2012, 12:15 PM
  4. Need help with Index + Match Multiple Results
    By xenohadden in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-11-2012, 05:00 PM
  5. Index and Match and multiple results
    By mike2bf in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-06-2008, 04:10 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