View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
MyVeryOwnSelf[_3_] MyVeryOwnSelf[_3_] is offline
external usenet poster
 
Posts: 56
Default comparing sheet to sheet and adding value

I have a workbook with 2 sheets.

I need a formula that will compare column a from sheet 1 with column a
from sheet two. If there is a value that matches, i need it to put value
out of that same row in sheet two and put it on column b in sheet 1 for
that particular value.


VLOOKUP is a natural function to use here. Check Excel's built-in Help for its details.

For example, try putting this in Sheet1!B1 and copying down as far as needed.
=IFERROR(VLOOKUP(A7,Sheet2!A:B,2,FALSE),"")
The IFERROR part covers the case where there is no match; it returns a zero-length string in this case.

In my example, the value is drawn from column B of sheet 2. For a different column, change A:B to A:E (or whatever) and increase the third parameter of VLOOKUP from 2 to reach the desired column.

(I have Excel 2010.)