LogicAdvanced

Make a lookup fail gracefully

A column of #N/A is not a bug — but shipping it to a reader is. Handling the expected failure without hiding the real ones.

The data

Row numberAB
1SKUProduct
2A-101Wireless Mouse
3A-102USB-C Dock
4B-204Monitor 27"

Your task

Look up SKU "Z-999" in column A and return the product. It is not there — make the formula return "Not in catalogue" instead of an error.

Your formula goes in E2

The checker compares your formula against the accepted answers — it does not run it. The expected result is shown with the solution so you can verify it in your own spreadsheet.

Why this is the right formula

IFNA catches #N/A and nothing else, so if somebody later deletes column B the formula shows #REF! instead of quietly reporting "Not in catalogue" forever. IFERROR would swallow both, which is why it is the wrong reflex around a lookup. XLOOKUP's built-in if_not_found argument is the cleanest of the three, because it never touches errors at all — it just handles the miss.

Try next

Practise it on a full dataset

Use this on your own site

Free to use, share and republish — including commercially. Attribution isn't required, but it's what keeps these free to make, and there's one ready to paste below.

Cite it

Questions

Does this actually run my formula?

The checker normalises case, spaces, argument separators and dollar-sign anchors, then compares your formula with a reviewed list of accepted answers. It does not evaluate the formula. Copy the data into your spreadsheet to verify the expected result independently.

Can a correct formula be rejected?

Yes. The accepted list includes several reviewed approaches, but cannot recognise every equivalent formula. Compare an unlisted solution with the expected result in your spreadsheet and use the page feedback if an accepted answer is missing.

Do I need an account?

No. There is no signup, no progress tracking and nothing stored — everything happens in your browser.