+ Reply to Thread
Results 1 to 7 of 7

combine two spreadsheets based on one unique key

  1. #1
    Registered User
    Join Date
    11-11-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2000
    Posts
    3

    combine two spreadsheets based on one unique key

    hello, I have two spreadsheets with two different sets of information about each account that I need to combine. For example:

    Account number A001 Mr Smith has address details in one spreadsheet
    Account number A001 Mr Smith has his purchase details in another spreadsheet.

    I want to combine Mr Smith's details all into one spreadsheet that I can then import into my Filemaker database. How do I do this?

    Excel version 2000 (yeah ... I know!)
    Thanks

    Kate

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: combine two spreadsheets based on one unique key

    Use the vlookup function, to match the Account number.

    If you provide samples of your workbooks, I can provide a more detailed formula.
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  3. #3
    Forum Expert ben_hensel's Avatar
    Join Date
    01-26-2012
    Location
    Northeast USA
    MS-Off Ver
    Office 365
    Posts
    2,043

    Re: combine two spreadsheets based on one unique key

    I would sort by account number so they're in the same order, then copypaste one spreadsheet's data smack next to the other's data. Then saveAs new file name.

    Then I'd check that I've got them ordered right by filling a helper column with =accountNumber_1 = accountNumber_2 and filter for FALSE (none = good).

    Then delete the helper & duplicate columns and save and be done, basically.

    Or you could move both sheets into the same workbook, connect them with
    sheet1!C1 = sheet2!A1
    and pull over&down to to get all the data on one page, then copy/paste values in place, then as above.

    Well...
    Are there duplicates or missing rows so that the ranges are different? That would require handling too.

  4. #4
    Registered User
    Join Date
    11-11-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2000
    Posts
    3

    Re: combine two spreadsheets based on one unique key

    Thanks - here are samples of my spreadsheets, I could do with some help using the VLOOKUP
    function if that's the way forward.
    Attached Files Attached Files

  5. #5
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: combine two spreadsheets based on one unique key

    To add customer Name, Contact Name and Email to your sales spreadsheet:

    In workbook [stock_sample.xls] worksheet [Product Sales By Customer] cell F2, enter:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    In cell G2:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    In cell H2:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Copy these formulae down, to the end of your data range.

  6. #6
    Registered User
    Join Date
    11-11-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2000
    Posts
    3

    Re: combine two spreadsheets based on one unique key

    FABULOUS! Thank you Thank you! I now have exactly what I wanted. This has to be the best forum on the planet. Happy Christmas from a very happy elf!

  7. #7
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: combine two spreadsheets based on one unique key

    Based on your last post in this thread, its apparent that you are satisfied with the solution(s) you've received and have solved your question, but you haven't marked your thread as "SOLVED". I will do it for you this time.

    In future, to mark your thread as Solved, you can do the following -
    Select Thread Tools-> Mark thread as Solved.

    Incase your issue is not solved, you can undo it as follows -
    Select Thread Tools-> Mark thread as Unsolved.

    Also, since you are relatively new to the forum, i would like to inform you that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post which helped you. This adds to the reputation of the person who has taken the time to help you.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ 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. Replies: 6
    Last Post: 05-15-2013, 10:32 PM
  2. [SOLVED] Combine multiple records onto one row based on unique name/surname in the first column
    By Anita7 in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 09-13-2012, 07:26 AM
  3. Combine rows based on unique column
    By excel_champ in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-27-2012, 03:34 AM
  4. Combine rows of data into 1 cell based on unique identifier
    By jud_goh in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-11-2010, 05:06 PM
  5. Combine record based on unique id
    By Apple Ling in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-27-2010, 09:38 AM

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