How to import data from one sheet to another

Hip Hip Array picture Hip Hip Array · Apr 12, 2011 · Viewed 175.6k times · Source

I have two different work sheets in excel with the same headings in in all the row 1 cells(a1 = id, b1 = name, c1 = price). My question is, is there a way to import data(like the name) from 1 worksheet to the other where the "id" is the same in both worksheets.

eg.
sheet 1                             sheet2
ID      Name       Price            ID        Name        Price
xyz     Bag        20               abc                     15
abc     jacket     15               xyz                     20

So is there a way to add the "Name" in sheet 1 the "Name" in sheet 2 where the "ID" in sheet 1 = "ID" in sheet 2?

Without coping and pasting of course Thanks

Answer

das_weezul picture das_weezul · Apr 12, 2011

VLookup

You can do it with a simple VLOOKUP formula. I've put the data in the same sheet, but you can also reference a different worksheet. For the price column just change the last value from 2 to 3, as you are referencing the third column of the matrix "A2:C4". VLOOKUP example

External Reference

To reference a cell of the same Workbook use the following pattern:

<Sheetname>!<Cell>

Example:

Table1!A1

To reference a cell of a different Workbook use this pattern:

[<Workbook_name>]<Sheetname>!<Cell>

Example:

[MyWorkbook]Table1!A1