Excel – Compare cells in two different spreadsheets and extract data from one an place it in the other if match found

microsoft excel

I need to find a way to compare two spreadsheets and if there is a match on specific cells, pull data from one sheet to another.

Say the two spreadsheets contain a value that identifies a piece of equipment:

spreadsheet 1       spreadsheet 2
Server              Server        Serial #
123abc              123abc        123-xx-456

There are of course many, many records/rows in each sheet.

I need to look at the first cell in the server column of sheet 1 and then search a range of cells in the sever column of sheet 2 for a match. If there is a match, I need to pull the serial # value from the cell in the matching row an put it into the serial # cell of the matching row in sheet 1 (all of the "serial #" cells in sheet 1 are presently empty.)

If that description explaination is too convoluted I can explain by answering any questions you may have.

My deadline for this task is Noon tomorrow, 30 Aug 2012. Yes, I got the task today at noon…. I am not an Excel user and just get thrust into it on occassion… Any help would be a huge assist.

Best Answer

I assume you are using row 1 for headings (as you indicated).  In cell B2 on Sheet1, enter

=VLOOKUP(A2, Sheet2!$A$2:$Z$99, 2, FALSE)

Adjust the $Z$99 to include all the data in Sheet2 that you need to access (i.e., it should be at least the lower right corner of the data).  The second-to-last parameter is 2 to access column B in Sheet2; for column F, use 6, etc.  Drag this formula down as many rows as you need to cover.

Related Question