Compare 2 excel sheets and copy content next to it.

Posted on 2007-07-27
Last Modified: 2010-03-05

I have 2 excel sheets. Both have the Emp id's identical but can be in a scattered manner and in Colum A in each sheet.
What i want to do is Excel B should search for the emp id in Excel A and copy all the contents next to it
In excel A i have
Emp id,Age,Name and in excel B i have seat no and county.
I want to combine them to one sheet.

Question by:bsharath
    LVL 45

    Expert Comment


    Here's a file using VLOOKUP() to assemble the data:

    Hope that helps

    LVL 11

    Author Comment

    Can you tell me what happens in the file you posted please.
    LVL 45

    Accepted Solution

    =VLOOKUP($A2,'Excel A'!$A$2:$C$10000,2,FALSE)

    The reads as "Lookup the value in A2 and find it in the first column of the range 'Excel A'!$A$2:$C$10000, and when found return the value on that row but in the second column of that range (in this case column B). The FALSE means return a value only if there is an exact match and it also allows the VLOOUP to work if the values in the range 'Excel A'!$A$2:$C$10000 when they are not not sorted."

    Same idea for the other column.

    Hope that helps
    LVL 45

    Expert Comment

    Sharath - Thanks for the grade - Patrick

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
    Convert between Excel file formats (.XLS, .XLSX, .XLSM) with/without macro option David Miller (dlmille) Intro Over this past Fall, I've had the opportunity to see several similar requests and have developed a couple related solutions associate…
    This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
    This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

    759 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

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now