Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2016-10-03
6
Medium Priority
?
67 Views
Last Modified: 2016-11-09
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!
0
Comment
Question by:Blistered Pawn
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 23

Assisted Solution

by:NBVC
NBVC earned 2000 total points
ID: 41826583
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
 
LVL 23

Expert Comment

by:NBVC
ID: 41826586
The only other way to diagnose is for you to post an actual workbook so we can see what is wrong.
0
 

Author Comment

by:Blistered Pawn
ID: 41826935
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
 
LVL 23

Accepted Solution

by:
NBVC earned 2000 total points
ID: 41826994
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
 

Author Comment

by:Blistered Pawn
ID: 41828118
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

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how to import an Outlook PST file to Office 365 using a third party product to avoid Microsoft's Azure command line tool, saving you time.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question