In this video we’ll look how to avoid and handle that situation.

The first thing to check is your lookup table.

double-check the table is properly defined and the lookup value is in the left-most column.

That’s because there is no employee with id E999.

Sometimes, though, the problem is more subtle.

For example, the code E785 is valid, and VLOOKUP correctly retrieves the information for Harold.

So, take care that your data and lookup values are clean and don’t contain extra characters.

One easy way to do this is to wrap the VLOOKUP function inside a function calledIFERROR.

it’s possible for you to useIFERRORto trap errors and return a more friendly value.

In this case, I’ll use “Not found.”

Be careful if you use this technique because IFERROR will catch any error that’s thrown by VLOOKUP.