+ Reply to Thread
Results 1 to 12 of 12

Merging two sheets with identical unique identifiers

  1. #1
    Registered User
    Join Date
    07-19-2012
    Location
    Toronto
    MS-Off Ver
    Excel 2010
    Posts
    7

    Merging two sheets with identical unique identifiers

    Hello,

    I would really appreciate if anyone could assist or point me in right area.

    I have two spreadsheets, Spreadsheet A and Spreadsheet B

    Spreadsheet A contains:

    InternalID
    First Name
    Last Name

    Spreadsheet B contains:

    ExternalID
    InternalID (identical to Spreadsheet A Internal ID)

    Request:

    I need to add the External ID to Spreadsheet A.

    Any ideas?
    Last edited by shade45; 07-20-2012 at 06:23 PM.

  2. #2
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Merging two sheets with identical unique identifiers

    A Vlookup..or INDEX,MATCH function would do it.

    =vlookup(A1,SheetB!A:B,2,false) if Internal ID is in ColA and Ext ID in ColB

    else, if its the other way around
    =INDEX(SheetB!A:B,MATCH(A1,SheetB!B:B,0),1)
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  3. #3
    Registered User
    Join Date
    07-19-2012
    Location
    Toronto
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Merging two sheets with identical unique identifiers

    I have more fields in each Sheet.

    Sheet A:

    ID (different than the Internal ID)
    Employee Number
    First Name
    Last Name
    Title
    Facility Code
    Internal ID
    External ID (area where I want to populate with Sheet B)

    Sheet B
    External ID
    Internal ID

  4. #4
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Merging two sheets with identical unique identifiers

    In that case, Column H on SheetA is where you want these...

    =INDEX(SheetB!A:B,MATCH(G1,SheetB!B:B,0),1) as you are looking up values in Column G

  5. #5
    Registered User
    Join Date
    07-19-2012
    Location
    Toronto
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Merging two sheets with identical unique identifiers

    Hi Ace_XL,

    I have pasted =INDEX(SheetB!A:B,MATCH(G1,SheetB!B:B,0),1) into Column H on SheetA and then it prompted me to choose the location of SheetB which I did.

    Once I did that I get #N/A

  6. #6
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Merging two sheets with identical unique identifiers

    Are these separate workbooks, or just different tabs on the same workbook? Kindly upload a sample to better understand..

  7. #7
    Registered User
    Join Date
    07-19-2012
    Location
    Toronto
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Merging two sheets with identical unique identifiers

    Two seperate workbooks.

    I have attached a sample for you.

    Thanks so much!
    Attached Files Attached Files

  8. #8
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Merging two sheets with identical unique identifiers

    Open both workbooks...

    In Cell H2 of aa.xls use

    =IFERROR(INDEX([BB.xlsx]Sheet1!$A:$A,MATCH(G2,[BB.xlsx]Sheet1!$B:$B,0),1),"") and drag down. Also change the format of all cells in Column G to number or genral format.

  9. #9
    Registered User
    Join Date
    07-19-2012
    Location
    Toronto
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Merging two sheets with identical unique identifiers

    For some reason I cannot get this to work....

    =IFERROR(INDEX([Prox.xlsx]Sheet1!$A:$A,MATCH(G2,[Prox.xlsx]Sheet1!$B:$B,0),1),"")

    I open my employees.xlsx worksheet which is identical to the AA.xlsx worksheet that I provided you however this one has real data.

    I went to H2 and pasted : =IFERROR(INDEX([Prox.xlsx]Sheet1!$A:$A,MATCH(G2,[Prox.xlsx]Sheet1!$B:$B,0),1),"") where Prox.xlsx is the worksheet (similar to BB.xlsx) however with real data.

    I then changed the H column to Number formation and dragged the cell down the list however the H Column did not pupulate.. no errors this time.

  10. #10
    Registered User
    Join Date
    07-19-2012
    Location
    Toronto
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Merging two sheets with identical unique identifiers

    Ok I see why it is not working...

    I have to click on each value in Column G and click on 'Convert to Number' once I do that the H Column populates.

    I tried to format the column to Numbers but this did not work.. it seems I need to click on each cell in the G Column and click on 'Convert to Number'

  11. #11
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Merging two sheets with identical unique identifiers

    Did you get this resolved? If yes, please mark the thread as solved

    To mark your thread solved do the following:
    - Go to the first post
    - Click edit
    - Click Advance
    - Just below the word "Title:" you will see a dropdown with the word No prefix.
    - Change to Solve
    - Click Save

  12. #12
    Registered User
    Join Date
    07-19-2012
    Location
    Toronto
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Merging two sheets with identical unique identifiers

    Thanks for all your help! Problem Solved.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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