+ Reply to Thread
Results 1 to 13 of 13

Match data and merge tables

  1. #1
    Registered User
    Join Date
    12-20-2016
    Location
    Everett, WA
    MS-Off Ver
    windows 7 enterprise
    Posts
    17

    Match data and merge tables

    Hi forum,
    My scenario:

    Table A has 360,000 records, table B has 400 records. They have uniquely matching data in column A.

    Q: What is the best way to merge both tables into one table with only the 400 records from table B?

    Thank you in advance for your help on this.

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,728

    Re: Match data and merge tables

    I think you need to give us a bit more detail about what data you have in which tables and where, and how you want to perform the merge, and you can best do this by attaching a sample Excel workbook. Take a look at the yellow banner at the top of the screen for details of how to do this.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    12-20-2016
    Location
    Everett, WA
    MS-Off Ver
    windows 7 enterprise
    Posts
    17

    Re: Match data and merge tables

    I realize I'm supposed to provide visuals typically, but all info is proprietary.

    I need all the record's data (the complete row) from each table.

    I'm not sure what you mean by where, the records are in Table A and B.

  4. #4
    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. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,869

    Re: Match data and merge tables

    You can desensitise the data - we only need to see a bit of sample data that replicates the issue.
    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.

  5. #5
    Registered User
    Join Date
    12-20-2016
    Location
    Everett, WA
    MS-Off Ver
    windows 7 enterprise
    Posts
    17

    Re: Match data and merge tables

    There's no issue to replicate as I haven't tried anything yet. I simply don't know how to go about doing this task.

  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. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,869

    Re: Match data and merge tables

    Very confusing! You said this:

    Table A has 360,000 records, table B has 400 records. They have uniquely matching data in column A.
    and this:

    all info is proprietary.
    We are not asking you to replicate an issue - we are asking for some sample data to work with.

  7. #7
    Registered User
    Join Date
    12-20-2016
    Location
    Everett, WA
    MS-Off Ver
    windows 7 enterprise
    Posts
    17

    Re: Match data and merge tables

    What kind of sample data would help you answer this question?

  8. #8
    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. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,869

    Re: Match data and merge tables

    A table A and a table B with some overlap of data that shows the type of set-up you have in front of you that we can't see.

  9. #9
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,728

    Re: Match data and merge tables

    You told us that you have unique matching data in column A of both sheets, and that's all. Is table A in one sheet and B in another sheet, or are they both in the same sheet?

    What columns of data do you have in both sheets?

    How do you want to merge them? If you have numeric data, should these be added, or averaged, or do you want the latest value, or something else etc.? If you have dates should these show the earliest or latest date, or a date range, or most frequent date etc. etc. ?

    If you have text values should these be joined together in some way, maybe separated by a comma?

    If you have new records, should these be added to Table B, or do you just want existing records in table B to be updated?

    These are the kind of details we need to have before being able to suggest a way forward. If you don't supply them, then how can we help you?

    Hope this helps.

    Pete

  10. #10
    Registered User
    Join Date
    12-20-2016
    Location
    Everett, WA
    MS-Off Ver
    windows 7 enterprise
    Posts
    17

    Re: Match data and merge tables

    That's very helpful. Okay so what I have is numbers in column A of both tables (in separate sheets). The numbers will match, but all other data in both tables are unique so would all need to be added to one table without alteration. I'll make a sample set of tables and post in a minute.

  11. #11
    Registered User
    Join Date
    12-20-2016
    Location
    Everett, WA
    MS-Off Ver
    windows 7 enterprise
    Posts
    17

    Re: Match data and merge tables

    Here is a sample of what I need.
    Attached Files Attached Files

  12. #12
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,728

    Re: Match data and merge tables

    You can put this in cell C2 of the Table B sheet:

    =VLOOKUP(A2,'Table A'!A:B,2,0)

    Copy it down if it doesn't do this automatically.

    Hope this helps.

    Pete

  13. #13
    Registered User
    Join Date
    12-20-2016
    Location
    Everett, WA
    MS-Off Ver
    windows 7 enterprise
    Posts
    17

    Re: Match data and merge tables

    That worked great using false instead of zero and locking the range. Thank you so much!

+ 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. Help with Pivot Tables to merge two tables
    By scrawl.to.me in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-26-2015, 06:01 AM
  2. Merge two tables, need to lookup/match mutiple criteria
    By TheRobsterUK in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-20-2013, 05:41 AM
  3. [SOLVED] How to match, merge and sum data
    By owum in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-19-2013, 08:12 PM
  4. Macro to merge/match data
    By celebrationnm in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-02-2012, 02:07 PM
  5. Need to match data on 2 sheets and merge matching
    By innovativesmoking in forum Excel General
    Replies: 1
    Last Post: 08-23-2010, 12:03 AM
  6. Replies: 0
    Last Post: 05-06-2009, 03:09 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