+ Reply to Thread
Results 1 to 4 of 4

copy and match data from one worksheet into another via script?

  1. #1
    Registered User
    Join Date
    12-16-2005
    Posts
    6

    copy and match data from one worksheet into another via script?

    Hi all
    I have two worksheets
    2 columns each

    The first sheet has ID and Name Column
    for example:
    Please Login or Register  to view this content.
    my 2nd sheet

    Please Login or Register  to view this content.
    How do i use the first sheet to match up the names on the 2nd sheet
    and ultimately copy the ID numbers onto the 2nd sheet?
    This is just a simplified example. There are thousands of entries.
    Thank you if you have any ideas

  2. #2
    Dave Peterson
    Guest

    Re: copy and match data from one worksheet into another via script?

    Maybe using =index(match()) would work for you.

    Debra Dalgleish's has some notes you may like:
    http://www.contextures.com/xlFunctions03.html (for =index(match()))

    put this in B2 of sheet2 to return the id from Sheet1 column A.
    =index(sheet1!a:a,match(a2,sheet1!b:b,0))



    Dev4me wrote:
    >
    > Hi all
    > I have two worksheets
    > 2 columns each
    >
    > The first sheet has ID and Name Column
    > for example:
    >
    > Code:
    > --------------------
    > ID[/B] NAME
    > 193948 Michael
    > 684588 John
    > 535279 Luke
    > 098734 Matthew
    > --------------------
    >
    > my 2nd sheet
    >
    > Code:
    > --------------------
    > ID [B]NAME
    > Michael
    > John
    > Luke
    > Matthew
    > --------------------
    >
    > How do i use the first sheet to match up the names on the 2nd sheet
    > and ultimately copy the ID numbers onto the 2nd sheet?
    > This is just a simplified example. There are thousands of entries.
    > Thank you if you have any ideas
    >
    > --
    > Dev4me
    > ------------------------------------------------------------------------
    > Dev4me's Profile: http://www.excelforum.com/member.php...o&userid=29709
    > View this thread: http://www.excelforum.com/showthread...hreadid=496807


    --

    Dave Peterson

  3. #3
    JennyC
    Guest

    Re: copy and match data from one worksheet into another via script?

    Presuming the NAME's are unique - VLOOKUP is what you need:

    First - you'll need to swap the ID and the name columns in the 1st sheet as
    VLOOKUP works from left to right

    Lookup_value = Select the ID in de 2nd sheet
    Table_array = Select the column NAME in the first sheet
    Col_index_num = 1

    Copy down the whole column in the 2nd sheet ...........

    Jenny


    "Dev4me" <[email protected]> wrote in message
    news:[email protected]...
    >
    > Hi all
    > I have two worksheets
    > 2 columns each
    >
    > The first sheet has ID and Name Column
    > for example:
    >
    > Code:
    > --------------------
    > ID[/B] NAME
    > 193948 Michael
    > 684588 John
    > 535279 Luke
    > 098734 Matthew
    > --------------------
    >
    >
    > my 2nd sheet
    >
    >
    > Code:
    > --------------------
    > ID [B]NAME
    > Michael
    > John
    > Luke
    > Matthew
    > --------------------
    >
    >
    > How do i use the first sheet to match up the names on the 2nd sheet
    > and ultimately copy the ID numbers onto the 2nd sheet?
    > This is just a simplified example. There are thousands of entries.
    > Thank you if you have any ideas
    >
    >
    > --
    > Dev4me
    > ------------------------------------------------------------------------
    > Dev4me's Profile:

    http://www.excelforum.com/member.php...o&userid=29709
    > View this thread: http://www.excelforum.com/showthread...hreadid=496807
    >




  4. #4
    Registered User
    Join Date
    12-16-2005
    Posts
    6
    This worked wonders!
    thanks guys!!!

+ 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