Excel 2013 - Index Match Array Formula NOT Returning Expected Results.

Hello,

My INDEX, MATCH Array formula keeps returning the wrong information.  Hopefully this will give enough information to explain the situation without getting lost in the weeds.

I have a workbook containing 2 sets of Bill of Materials data.

Details:  
Worksheet 1 - 12,000 lines of Data - (Child PN can potentially be used in any of the 10 BOM levels, so I created a running total column to count instances of occurrence)

Worksheet 2 - 18,000 lines of data -

      Sheet 1                              
      Table Name:  tblCurrentData                              
Model      Parent      Child      Qty      Data Point      ModParChildRunCount      Running Count of ModParChild
Loki      Zeus      Icarus      17      Sam, Bill, Dave      Loki - Zeus - Icarus - 1      1
Medusa      Cyclops      Thebes      3      Ed, Alex, Al      Medusa - Cyclops - Thebes - 1      1
Loki      Zeus      Icarus      50      Jim, Fred, Barney, Lester      Loki - Zeus - Icarus - 2      2
                                    
      Sheet2                              
      Table Name:  tblTransferData                              
Model      Parent      Child      Qty      Data Point      ModParChildRunCount      Running Count of ModParChild
Loki      Zeus      Icarus      50      Jim, Fred, Barney, Lester      Loki - Zeus - Icarus -1      1
Medusa      Cyclops      Thebes      88      Ed, Alex, Al      Medusa - Cyclops - Thebes - 2      1
Loki      Zeus      Icarus      17      Sam, Bill, Dave      Loki - Zeus - Icarus - 2      2
                                    
      Array Formula on Sheet 2 (cell G2):  =INDEX(tblCurrentData,MATCH(ModParChildRunCount,tblCurrentData[ModParChildRunCount],0),4)                              
      Array Formula on Sheet 2 (cell H2):  =INDEX(tblCurrentData,MATCH(ModParChildRunCount,tblCurrentData[ModParChildRunCount],0),5)                              
      
So the results seem to be backwards:                              
      Results from G2 Array lookup (for Loki - Zeus - Icarus - 1)                        50      Jim, Fred, Barney, Lester
      Results from H2 Array lookup (for Loki - Zeus - Icarus - 2)                        17      Sam, Bill, Dave

I would expect to see:  Loki - Zeus - Icarus - 2 to return 50 and Jim, Fred, Barney, Lester.  NOT 17, Sam, Bill, Dave.

Any ideas?

Thank you all for your help!
Blistered PawnAsked:
Who is Participating?
 
NBVCCommented:
I think it has to do with your sort... in your Sheet 2, Qty of 53 comes after Qty of 13.  In your Sheet 1, it is the reversed.  The MATCH() looks for exact match of what you have in column I of Sheet1.

My suggestion is either to change the sort order so both sheets are same sort... or you can add the Qty to your concatenations so now you will be more precise in search.
0
 
NBVCCommented:
The formula looks right.  It should return first "exact match".  Check if there any leading/trailing spaces in the indexed column where you think the match should happen.
0
 
NBVCCommented:
The only other way to diagnose is for you to post an actual workbook so we can see what is wrong.
0
 
Blistered PawnAuthor Commented:
Hello Gurus,

If you look at the attached file you can see the lookup issue.  Please See "Screenshot Explanation Tab".

I created "helper fields" in columns G-H on Sheet1. (Columns F-H on Sheet2)

Sheet1 Contains Table named "tblBOMData"
Sheet2 Contains Table named "tblImportData"

For a Match between both tabs on Column I--the Index Match Array is pulling in opposite quantities.  

Pulling in reverse information:
Sheet1 BOMData for record = LarryMoeCurly^HAT2GEJ101X^1 is Qty of 53.  Formula is pulling in QTY of 13 and corresponding ImportData DataPoints
Sheet1 BOMData for record = LarryMoeCurly^HAT2GEJ101X^2 is Qty of 13.  Formula is pulling in QTY of 53 and corresponding ImportData DataPoints

Any help is immensely appreciated.

Regards.
Index-Match-Issue.xlsx
0
 
Blistered PawnAuthor Commented:
Hello NBVC.  Thank you for your reply and ideas.

Sorting both sheets in the same order did not seem to help the INDEX/MATCH formula.  Also, unfortunately, some quantities in Sheet1 are incorrect.  Sheet2 quantities however, are correct.  

So, that wouldn't provide for consistent matching.

Any other ideas?  I posted a new question about the possibility of sorting the text contents of a cell in alphabetical order.  Hoping to get an answer there with the idea of being able to concatenate the DataPoint columns for the INDEX/MATCH.

Thank you.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.