ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Matching and copying problem (https://www.excelbanter.com/excel-programming/339112-matching-copying-problem.html)

benneter

Matching and copying problem
 
I am sure this is simple, but I have no idea how to get it done. I
have two sheets of data, each with a column representing a unique
identifier. I want to Search Worksheet 2 for the unique identifier
from Worksheet 1, once it finds it, I want to copy a single cell from
worksheet 2 to worksheet 1. For example.
Worksheet 1
Column A Column B
677 1249
822 9021
921 6121

Worksheet 2
Column A Column X
677 phos
822 ubiq
921 glyc

I want to find the row with the unique identifier from column A of
worksheet 1 (677) and find it in worksheet 2, copy the text from column
X to column C of worksheet 1 so that it looks like this in the end.
Column A Column B Column C
677 1249 phos
822 9021 ubiq
921 6121 glyc

Thanks for any help.


William[_2_]

Matching and copying problem
 
Hi benneter

In worksheet2, name the entire range containing data in Columns A to X "rng"
(without invertted commas).

In worksheet1, enter the following formula in cell C1
=vlookup(A1,rng,24,false)

Copy cell C1 down as far as you need.

You may then want to "Copy/PasteValues" the resultant formulae in Column C

--


XL2003
Regards

William



"benneter" wrote in message
oups.com...
I am sure this is simple, but I have no idea how to get it done. I
have two sheets of data, each with a column representing a unique
identifier. I want to Search Worksheet 2 for the unique identifier
from Worksheet 1, once it finds it, I want to copy a single cell from
worksheet 2 to worksheet 1. For example.
Worksheet 1
Column A Column B
677 1249
822 9021
921 6121

Worksheet 2
Column A Column X
677 phos
822 ubiq
921 glyc

I want to find the row with the unique identifier from column A of
worksheet 1 (677) and find it in worksheet 2, copy the text from column
X to column C of worksheet 1 so that it looks like this in the end.
Column A Column B Column C
677 1249 phos
822 9021 ubiq
921 6121 glyc

Thanks for any help.







All times are GMT +1. The time now is 11:42 PM.

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