+ Reply to Thread
Results 1 to 7 of 7

Sum of multiple Index Match returns!?

  1. #1
    Registered User
    Join Date
    05-26-2013
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    79

    Question Sum of multiple Index Match returns!?

    Hi All,

    I have been trying for ages to solve this problem with Index Match or Vlookup and Hlookup but to no avail.

    I wish to find the sum of total performance for each asset for a given day (24hr periods). However, this requires summing multiple matches for my lookup criteria as my raw data is split into Day Shift (DS) and Night Shift (NS) for each given day. (See the attached workbook, Tab G).

    Normally this would be a very easy scenario, and possibly still is however I have some limitations. I am not able to add, remove or change any rows of data, thus no helper columns, and I need to be able to copy the formula down for each Assets table as can be seen in 'Tab F'. I am not concerned about having to change the cell reference for the Asset ID manually for each table if that has to be the case (K1 for the first table).

    The other issue is that in Tab G, as the asset ID is listed in a merged cell, which starts above the row of data I need to sum, I have an issue looking up that row and I imagine I may have to use the offset function to counter for this. As a last resort I can un-merge these cells and insert the asset Id in the bottom cell so it aligns with the row of data that will be summed except this is a Last Resort. Again see the attached workbook for more information...

    Index_Match_Lookup_Multiple Sums.xlsx

    Any help or guidance on this problem would be greatly appreciated. Just remember that I am restricted to not being able to add helper collumns/rows into the existing spreadsheet.

    Thanks in advance,

    Regards,

    Spicey_888

  2. #2
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Sum of multiple Index Match returns!?

    Hi.

    Yes - that really isn't a very good layout at all, I'm afraid. All those merged cells!

    =SUMIFS(INDEX(F!$1:$1048576,MATCH(K$1,F!A:A,0)+1,),F!$3:$3,G!A2)

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Sum of multiple Index Match returns!?

    XOR LX... Much simpler than mine (which was considerably more involved). However, I think that this modification is useful...

    =SUMIFS(INDEX(F!$1:$1048576,MATCH(OFFSET($K$1,INT((ROW()-2)/34)*34,0),F!A:A,0)+1,),F!$3:$3,G!A70)
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  4. #4
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Sum of multiple Index Match returns!?

    @Glenn

    Ah. I've see you've attempted to confront the merged cells issue head-on! Respect!

    But is it actually necessary here?

    Also, I think ROWS is a more rigorous choice than ROW (especially in its unqualified form, i.e. ROW()):

    http://excelxor.com/2014/08/25/row-v...er-generation/

    Cheers

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Sum of multiple Index Match returns!?

    Yes, I had it working fully. But, since yours was far nicer - I didn't bother posting it. Mine was full of INDIRECTs and ADDRESSs. Just to show that a little knowledge can be a dangerous thing, here's what I had come up with.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Of course, I do agree with you about ROWS as opposed to row.

    =SUMIFS(INDEX(F!$1:$1048576,MATCH(OFFSET($K$1,INT((ROWS($1:1)-2)/34)*34,0),F!A:A,0)+1,),F!$3:$3,G!A138)

    would therefore be better.

    As to necessity, surely it is... The Table begins again for the next asset at row 36 and is looking to match the asset number at K35. And it keeps repeating at the same interval down the sheet. Your formula, if copied unmodified into the (ghastly) merged I36 cell, will still (incorrectly) refer to K1.

  6. #6
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Sum of multiple Index Match returns!?

    Ah! Wow! I thought the layout was bad - I didn't realise it was that bad!! I didn't even see the tables below!

    Ok, then if the OP is after a single formula to be copied down then that's what you've managed to create, so well done.

    Can't help thinking just how difficult some people make it for themselves, though...

    Cheers

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Sum of multiple Index Match returns!?

    Yea... whoever came up with the merged cells should be given a serious talking-to (to say the least). Talk about making a simple job more difficult.

+ 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 returns #N/A result
    By pjkcpa in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-27-2014, 02:23 PM
  2. [SOLVED] MATCH/INDEX Formula Returns an Error Instead of 0
    By livifivil in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-07-2013, 04:18 PM
  3. Replies: 2
    Last Post: 08-16-2012, 09:00 AM
  4. Excel 2007 : Index Match returns 0
    By Martin Chamberlin in forum Excel General
    Replies: 6
    Last Post: 10-27-2011, 09:49 PM
  5. Solving INDEX/MATCH duplicate returns
    By kualjo in forum Excel General
    Replies: 3
    Last Post: 08-27-2011, 05:01 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