Search a text into another worksheet and if found, copy the entire raw in the table

New Contributor

Hello all, i am trying to find a way to automatically populate a table with some data from another worksheet.

For example, i have an worksheet with raw data like the one below.


and another worksheet with the table below.


I would like to create a VBA code or something to help me automatically import data from the raw data worksheet to the table from the other worksheet.

The primary worksheet is the one with the table and based on the serial number I introduce in the A column to import the data to column B from the worksheet with raw data.

Can anyone please assist or guide me? Much appreciated.

3 Replies


Perhaps the attached workbook (an example with som random part numbers) contains  the answer to your question. No need for VBA. A simple VLOOKUP will do. 


@Riny_van_Eekelen thank you for the answer. It works, but in my situation i have the raw data into another worksheet where I regularly update with new information. Will vlookup work with different worksheet?



Yes it will work across workbooks. Say your raw data sits in "Book1". Make sure your formula looks like this: =VLOOKUP($A$2,[Book1]RawData!A:G,2,FALSE)


You can make the formula easier to maintain (if applicable) when you create a named range for your table that contains the raw data. So, if you would name the range of columns A to G in sheet "RawData" to e.g. "DataList" the formula would become:




I also find such formulae easier to read. But that's just my personal opinion.