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 column B
. I need it to return 0
if no exact match is found, or the B
column value if an exact match is found.
I've tried changing the function to VLOOKUP
and HLOOKUP
but it doesn't ever return any value.
If the VLOOKUP function does not find an exact match, it will return the #N/A error. By using the IF and ISNA functions, you can return the Unit Price value if an exact match is found. Otherwise, a 0 value is returned. This allows you to perform mathematical operations on your VLOOKUP results.
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)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With