What I want to do is to say if the contents of cell D3
(on current worksheet) exist in column A
in the first worksheet (in my case entitled list). (and they always do exist somewhere). Return the contents of the corresponding row in Column C
.
In other words if the matching cell is found in Row 12
- return data from C12
.
I've used the following syntax but I can't seem to get the last part to work correctly.
=IF(ISERROR(MATCH(D3,List!A:A, 0)), "No Match", VLOOKUP(D3,List!A:A,1,TRUE))
How to fix the formula?
You can use following formulas.
For Excel 2007 or later:
For Excel 2003:
Note, that
List!A:C
inVLOOKUP
and returns value from column №3
VLOOKUP
equals toFALSE
, in that caseVLOOKUP
will only find an exact match, and the values in the first column ofList!A:C
do not need to be sorted (opposite to case when you're usingTRUE
).