Explanation
The first instance of VLOOKUP simply looks up the lookup value (the id in this example):
=IF(VLOOKUP(id,data,1,TRUE)=id
and returns TRUE only when the lookup value is found. In that case,
the formula runs VLOOKUP again in approximate match mode to retrieve a value from that table:
VLOOKUP(id,data,col,TRUE)
There's no danger of a missing lookup value, since the first part of the formula already checked to make sure it's there.
If the lookup value isn't found, the "value if FALSE" part of the IF function runs, and you can return any value you like. In this example, we use NA() we return an #N/A error, but you could also return a message like "Missing" or "Not found".
Remember: you must sort the data by lookup value in order for this trick to work.