ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   verifying one cell and pasting number next to it (https://www.excelbanter.com/excel-programming/349147-verifying-one-cell-pasting-number-next.html)

Dev4me

verifying one cell and pasting number next to it
 

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=496806


Tom Ogilvy

verifying one cell and pasting number next to it
 
Look in Excel Help (not VBA) at the Index and Match Function

=Index(Sheet1!$A:$A,Match(B1,Sheet1!$B:$B,0),1)

Put in A2 of the second sheet and drag fill down the column.

--
Regards,
Tom Ogilvy





"Dev4me" wrote in
message ...

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=496806





All times are GMT +1. The time now is 10:40 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com