+ Reply to Thread
Results 1 to 3 of 3

Joining two datasheets on common ID...

  1. #1
    Registered User
    Join Date
    01-28-2009
    Location
    Brisbane
    MS-Off Ver
    Excel 2007
    Posts
    8

    Joining two datasheets on common ID...

    Hi guys

    I have a bunch of data - some on one sheet, some on another.

    Sheet A has more data.

    Sheet B has data that will be on Sheet A....and has less data.

    Both information for each person has a common ID number on each sheet.

    I need it to basically copy the data from Sheet B, and place it accordingly (to the right....extending the number of columns) in line with it's corresponding number on Sheet A. If this were in Access, it would be a query and a LEFT JOIN.

    Not sure how in Excel!

    Many thanks for your help...
    Last edited by VBA Noob; 01-28-2009 at 02:58 AM.

  2. #2
    Forum Contributor vandanavai's Avatar
    Join Date
    09-04-2006
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    256

    Re: Joining two datasheets on common ID...

    Hello

    I am not clear about ur requirement. But u may use Vlookup fuction. Or upload sample file for better understanding of problem.

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Joining two datasheets on common ID...

    Make sure the ID is on the leftmost column of Sheet B, then a VLOOKUP formula should do it.

    Add the appropriate column names to Sheet A for the data you're bringing across. If on SheetA - A2 is the ID to match, then in the first column, enter a formula like:

    =VLOOKUP(A2,SheetB!$A$2:$G$200,4,FALSE)

    This matches the ID in SheetA-A2 to the same ID in SheetB in columnA, then returns the value 4 columns over. Pull that formula down and it will fill in answers for the other matching IDs. Adjust the column ranges if they need to widen or rows lengthen.

    Now, use the same formula in the next column, just change the 4 to the column position that holds the next piece of data.

    When you're done bringing data over with VLOOKUP formulas, highlight all the new data and do a Copy, Edit > PasteSpecial > Values to make the data permanent.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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