Look in one table, and if there's no match, fall back to another.
Copy this formula
=IFERROR(VLOOKUP(A2, T1, 2, 0), IFERROR(VLOOKUP(A2, T2, 2, 0), "Not found"))Nesting lookups inside IFERROR makes Excel try the first table, and only if that errors does it try the next — ending with a default message. It's a clean way to search across several sources in priority order.
=IFERROR(XLOOKUP(A2, IdsA, NamesA), XLOOKUP(A2, IdsB, NamesB, "?"))→Found in BFalls back to the second source.
Stack the tables into one (or use VSTACK in 365) and do a single lookup instead of deep nesting.
Need a formula for your own data?
Describe what you want in plain language and let ExcelGPT write, explain, and verify the formula — free to start, no plugin.