ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   How to populate one sheet with data from another sheet (https://www.excelbanter.com/new-users-excel/14939-how-populate-one-sheet-data-another-sheet.html)

KH

How to populate one sheet with data from another sheet
 
I have 2 sheets in the excel file.
On the first sheet the first colum is a part num only.
The second sheet has part num on the first column and descriptions on the
second column.
I need a macro or script that will scan the second sheet for part num that
matches
the first sheet part num and populate the description(at the second column)
on the first excel sheet.


--
KH

Max

One way ..

Assuming the reference data is in Sheet2, cols A and B
col A = part#, col B = description

In Sheet1
-----------
With col A containing part# in A2 down,

Put in B2:

=IF(ISNA(MATCH(A2,Sheet2!A:A,0)),"",VLOOKUP(A2,She et2!A:B,2,0))

Copy down

Col B will return the descriptions corresponding
to the part# in col A.

Unmatched part#s will return blanks: ""

Adapt to suit ..
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
"KH" wrote in message
...
I have 2 sheets in the excel file.
On the first sheet the first colum is a part num only.
The second sheet has part num on the first column and descriptions on the
second column.
I need a macro or script that will scan the second sheet for part num that
matches
the first sheet part num and populate the description(at the second

column)
on the first excel sheet.


--
KH





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

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