Instead of using
That way the exception when it can't find the value (Error 2042) will not be thrown. You will need to check the result for the error though
if IsError(v1) then
You can have issues using VLOOKUP if the data is not the same type.
For example I am still getting an error (although it is handled better), but if I use
message = [an exact value from the range]
I don't get the error.
So you need to make sure that the data in your Lookup Range is of the same type as the lookup value. It's always a lot easier to use text for your lookups than numeric or date.
Basically both your original exception and my suggested solution are reporting that they cannot find the value you are trying to look up.
The following link might help you sort out the VLOOKUP How to correct a #N/A error in the VLOOKUP function - Office Support