Procurement just typed a supplier name into the query box (F2). The full supplier master sits on the left. Use XLOOKUP in G2 to return the matching lead time — and add a fallback so a typo or unlisted vendor degrades to 'Not found' instead of #N/A.
Practice using XLOOKUP to solve a real small business problem. By the end, you’ll know when to reach for it and how to structure the arguments correctly.
Procurement just typed a supplier name into the query box (F2). The supplier master table sits on the left (A-D) with contact, minimum order, and lead time. Return the lead time in G2 — and if procurement typed a name that isn't on the list, show 'Not found' instead of a raw #N/A.
In G2, return the lead time (column D) for the supplier in F2. Use XLOOKUP with "Not found" as the fourth argument so missing suppliers degrade gracefully.
XLOOKUP is the modern lookup function: it searches one range for a value, then returns the matching cell from a separate result range. Unlike VLOOKUP, it can look in any direction, defaults to exact match, and has a built-in if-not-found argument so you don't need IFERROR.
XLOOKUP(lookup_value, lookup_array, return_array, [if_not_found], [match_mode], [search_mode])Try the formula first. Hints cost CP for a reason.