Link to home
Start Free TrialLog in
Avatar of Blistered Pawn
Blistered PawnFlag for United States of America

asked on

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!
SOLUTION
Avatar of NBVC
NBVC
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
The only other way to diagnose is for you to post an actual workbook so we can see what is wrong.
Avatar of Blistered Pawn

ASKER

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
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.