+ Reply to Thread
Results 1 to 19 of 19

Need to match data on multple tables

  1. #1
    Registered User
    Join Date
    03-28-2013
    Location
    Miami, FL
    MS-Off Ver
    Excel 2003
    Posts
    11

    Exclamation Need to match data on multple tables

    I am running Excel 2007. I've searched for answers to this but nothing seems to work. I'll try to give as concise an explanation as possible:

    I am creating a report to match a customer number to a customer when it appears on an order. However, the order only lists the invoice number and not the customer number. I need to cross reference the invoice to another master list that has the name, CID, and invoice, and show the customer number as a result on the invoice report.

    I attached a sample to get the jist of what I'm trying to do (and yes the invoice report may not be in order so I need to be sure the name and invoice match the first list)

    I have these reports on 2 tabs in the same workbook.

    Side Note: I manually matched (hopefully) these two lists in one sheet (2 tables) and wonder if there is a way to have excel look at say B2 and M2 and if the name matches to place an "X" on the cell beside it?

    Thank you! This is really time sensitive and don't want to go through hundreds of customers manually to input the info.

    Thank you again!
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,444

    Re: Need to match data on multple tables

    I'm not entirely clear what your expected outcome is. Are you wanting to return an ID number or an X?
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Need to match data on multple tables

    This array formula** entered in I2 and copied down as needed:

    =INDEX(C$2:C$6,MATCH(1,(A$2:A$6=G2)*(B$2:B$6=H2),0))

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  4. #4
    Registered User
    Join Date
    03-28-2013
    Location
    Miami, FL
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Need to match data on multple tables

    Ideally I want to get the names and invoices in the second table/report to look at the first table/report and in the green column display the customer number.


    I started to do this manually and matched the names and invoices using conditional formatting (hoping it worked)and want to validate that I matched them correctly. [Mainly why I am asking the first question since I don't want to match manually and have excel just cross reference the data] If it's confusing, ignore the "X" question because what I really need is the CID

  5. #5
    Registered User
    Join Date
    03-28-2013
    Location
    Miami, FL
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Need to match data on multple tables

    Thanks Tony. That works on the test file, now to try the main project and hope I don't crash the system lol. I'll advise in a bit!

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,444

    Re: Need to match data on multple tables

    Then a simple VLOOKUP should do:

    =VLOOKUP(H2,$B$2:$C$6,2,0)

  7. #7
    Registered User
    Join Date
    03-28-2013
    Location
    Miami, FL
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Need to match data on multple tables

    I tried both formulas on the test file and it works, but in the real report I get N/A results. I even tried it on like 20 entries instead of the 1000+ but no different. and I know there should be at least 2 positive results if the formula would work as intended. not sure what can be causing the problem

  8. #8
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Need to match data on multple tables

    This link describes some common data problems...

    http://contextures.com/xlFunctions02.html#Trouble

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,444

    Re: Need to match data on multple tables

    Quote Originally Posted by Kenja View Post
    I tried both formulas on the test file and it works, but in the real report I get N/A results. I even tried it on like 20 entries instead of the 1000+ but no different. and I know there should be at least 2 positive results if the formula would work as intended. not sure what can be causing the problem
    A mismatch of data and leading or trailing spaces are the main cause. Try this to check for the latter:

    =VLOOKUP("H2*",$B$2:$C$6,2,0)

  10. #10
    Registered User
    Join Date
    03-28-2013
    Location
    Miami, FL
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Need to match data on multple tables

    I think there is something in the data that the formula is not liking. I'm thinking its the name. How do I change the Array Formula to only pick up the invoice number and return the CID?

  11. #11
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,444

    Re: Need to match data on multple tables

    The VLOOKUP does that.

  12. #12
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,444

    Re: Need to match data on multple tables

    Let's have a look at some real data. Attach the workbook here with sensitive data obfuscated.

  13. #13
    Registered User
    Join Date
    03-28-2013
    Location
    Miami, FL
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Need to match data on multple tables

    Attached is a more accurate example of what I am using. Here the Array formula worked, but the VLOOKUP did not. not sure why. I cleaned the cell data on the original report but neither formula works yet. Trying to get an understanding of how the formula works and see if building it from scratch may help.

    thank you all for your help so far :D
    Attached Files Attached Files

  14. #14
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Need to match data on multple tables

    Can you post a file with just enough data where it shows the #N/A errors?

    We don't want a file with 100's or 1000's of rows and dozens of columns worth of data. We just need the MINIMUM amount of data that demonstrates your problem. Having to sift through irrelevant data just makes it harder to find the real problem.

  15. #15
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Need to match data on multple tables

    In your sample file you're having to lookup to the left so in this case a "standard" VLOOKUP function won't work.

    You can use an INDEX function:

    =INDEX(B$2:B$26,MATCH(F2,C$2:C$26,0))

  16. #16
    Registered User
    Join Date
    03-28-2013
    Location
    Miami, FL
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Need to match data on multple tables

    Thanks Tony that worked! So far so good. Now for the bonus question.

    Can I use the same formula to do the same thing but the array list is on a separate sheet. In other words, instead of looking at the table of data on the left, it would be the same table of data on the "CID" tab. If this works, you would have saved us countless hours of manpower!

  17. #17
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,444

    Re: Need to match data on multple tables

    It'll be something like this:

    =INDEX(CID!B$2:B$26,MATCH(F2,CID!C$2:C$26,0))

  18. #18
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Need to match data on multple tables

    Quote Originally Posted by Kenja View Post
    you would have saved us countless hours of manpower!
    Sometimes that's known as "job security".

    Good luck!

  19. #19
    Registered User
    Join Date
    03-28-2013
    Location
    Miami, FL
    MS-Off Ver
    Excel 2003
    Posts
    11

    Thumbs up Re: Need to match data on multple tables

    YES!!! It worked. I had to clean the data as the download added characters that were throwing it off, but I got it all to work. (It was 3 reports I was comparing in one final report) but it all worked out.

    THANK YOU!!!

+ 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. VLOOKUP with multiple criteria across multple tables
    By Quasis in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-08-2015, 09:06 AM
  2. Add multple types of data sequentially
    By DURGESH88 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-19-2015, 11:03 PM
  3. Multple data Lists into one Row
    By Sarah Christian in forum Excel General
    Replies: 2
    Last Post: 12-02-2013, 06:45 AM
  4. Need Help with a VBA that updates similar tables in multple sheets
    By rjnewsome in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-27-2013, 06:18 PM
  5. Replies: 7
    Last Post: 06-19-2011, 12:51 PM
  6. Need help importing data to multple worksheets.
    By jgonzo in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-16-2006, 11:50 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