+ Reply to Thread
Results 1 to 4 of 4

Need to match colum 1 in two different sheets, and insert colum 2 and 3

  1. #1
    Registered User
    Join Date
    04-08-2011
    Location
    College Station, TX
    MS-Off Ver
    Excel 2007
    Posts
    2

    Need to match colum 1 in two different sheets, and insert colum 2 and 3

    I have two sheets with this data:

    For sheet 1, a piece of the data is like this:

    Entry Hybrid Company

    1 Belle 1533Y Belle Southern Hybrids
    2 Belle 1525R Belle Southern Hybrids
    3 Belle 1545RY Belle Southern Hybrids
    4 Belle 1747 RY Belle Southern Hybrids

    for the sheet 2, I have just have the entry number replicated four times:

    Entry number
    1
    1
    1
    1
    2
    2
    2
    2
    3
    3
    3
    3
    4
    4
    4
    4

    I need to match entry number in sheet 1 and 2, then insert column 2 and 3 in sheet two.

    The way that the data have to be arranged is this:

    1 Belle 1533Y Belle Southern Hybrids
    1 Belle 1533Y Belle Southern Hybrids
    1 Belle 1533Y Belle Southern Hybrids
    1 Belle 1533Y Belle Southern Hybrids
    2 Belle 1525R Belle Southern Hybrids
    2 Belle 1525R Belle Southern Hybrids
    2 Belle 1525R Belle Southern Hybrids
    2 Belle 1525R Belle Southern Hybrids
    3 Belle 1545RY Belle Southern Hybrids
    3 Belle 1545RY Belle Southern Hybrids
    3 Belle 1545RY Belle Southern Hybrids
    3 Belle 1545RY Belle Southern Hybrids
    4 Belle 1747 RY Belle Southern Hybrids
    4 Belle 1747 RY Belle Southern Hybrids
    4 Belle 1747 RY Belle Southern Hybrids
    4 Belle 1747 RY Belle Southern Hybrids

    and so on....

    I know that I can do this by copy and paste, but I have a large amount of data so I need to do it in a better way, please, I need some help. When I work in a previous company, they used a macro to match data columns, then insert the next 2,3 or 4 colums. I know that there is a way to do it, but I do not know how

    Does somebody know?
    thanks for your help
    Last edited by idbarrero; 04-09-2011 at 11:41 AM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,428

    Re: Need to match colum 1 in two different sheets, and insert colum 2 and 3

    Not sure why you would want to do that, but:

    Sheet 2, B2:=VLOOLUP(A2,'Sheet 1'!A:D,2,FALSE)
    Sheet 2, C2:=VLOOLUP(A2,'Sheet 1'!A:D,3,FALSE)
    Sheet 2, D2:=VLOOLUP(A2,'Sheet 1'!A:D,4,FALSE)

    and copy down.

    Regards
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    04-08-2011
    Location
    College Station, TX
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Need to match colum 1 in two different sheets, and insert colum 2 and 3

    Sweet,,,

    TMShucks, thank you so much for your time,

    you've just saved me a couple of hours of work

    best regards

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,428

    Re: Need to match colum 1 in two different sheets, and insert colum 2 and 3

    You're welcome.

    If that answers your question, 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

    Regards

+ 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