PC Review


Reply
Thread Tools Rate Thread

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

 
 
Dev4me
Guest
Posts: n/a
 
      29th Dec 2005

Hi all
I have two worksheets
2 columns each

The first sheet has ID and Name Column
for example:

Code
-------------------
ID[/B] NAM
193948 Michael
684588 John
535279 Luke
098734 Matthe
-------------------


my 2nd sheet


Code
-------------------
ID [B]NAM
Michael
John
Luke
Matthe
-------------------


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 idea

--
Dev4m
-----------------------------------------------------------------------
Dev4me's Profile: http://www.excelforum.com/member.php...fo&userid=2970
View this thread: http://www.excelforum.com/showthread.php?threadid=49680

 
Reply With Quote
 
 
 
 
Dave Peterson
Guest
Posts: n/a
 
      29th Dec 2005
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
 
Reply With Quote
 
JennyC
Guest
Posts: n/a
 
      30th Dec 2005
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" <(E-Mail Removed)> wrote in message
news(E-Mail Removed)...
>
> 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
>



 
Reply With Quote
 
Dev4me
Guest
Posts: n/a
 
      4th Jan 2006

This worked wonders!
thanks guys!!!


--
Dev4me
------------------------------------------------------------------------
Dev4me's Profile: http://www.excelforum.com/member.php...o&userid=29709
View this thread: http://www.excelforum.com/showthread...hreadid=496807

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I match numeric data from two column in same worksheet =?Utf-8?B?aG9tZWZ1bndvcmsuY29t?= Microsoft Excel Misc 1 26th Jan 2007 05:01 PM
Match duplicate data in 2 columns in a worksheet =?Utf-8?B?S3Jpcw==?= Microsoft Excel Worksheet Functions 16 13th Sep 2006 02:59 AM
Match duplicate data in 2 columns in a worksheet =?Utf-8?B?S3Jpcw==?= Microsoft Excel Worksheet Functions 0 10th Sep 2006 05:46 AM
match cell from one worksheet to data in another =?Utf-8?B?bWFuZHlz?= Microsoft Excel Setup 1 20th Jul 2005 10:19 PM
Data match using VB script Lillian Microsoft Excel Programming 2 9th Aug 2004 10:16 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:08 AM.