Excel find corresponding value, return `0` if not found
15,895
The following should lookup the value in C2 against the values on the sheet in column A, if it finds a match then it will show it, if it doesn't then it will throw an error which will then return 0
=iferror(vlookup(C2,'Jul-14'!A:B,2,False),0)
Comments
-
Tom Gullen almost 2 years
I have the formula:
=LOOKUP(C2,'Jul-14'!A:A,'Jul-14'!B:B)
Where:
C2
= "Aruba (AW)"
The sheet "Jul-14" doesn't contain the value "Aruba (AW)" in column
A
. When this happens, it seems to take the closet match and return the value in columnB
. I need it to return0
if no exact match is found, or theB
column value if an exact match is found.I've tried changing the function to
VLOOKUP
andHLOOKUP
but it doesn't ever return any value.