XLOOKUP practice: reject ambiguous customer keys Original fictional practice data · 2026-11-11 · CC BY 4.0 BRIEF A CRM export contains repeated master rows and conflicting account owners. Supply an owner for each opportunity only when the master provides a single distinct owner. CONTRACT 1. Identical owner rows are harmless repeats; distinct owner names for the same customer are a conflict. 2. Use REVIEW_DUPLICATE for conflicting keys and REVIEW_MISSING for absent keys. Never silently take the first conflicting owner. 3. Output opportunity_id, owner_status in opportunity_id order. METHOD Build a distinct customer/owner table before checking key counts. Flag K2 as a conflict; deduplicate K1 to one trusted mapping. Join or look up the trusted mapping and keep all four opportunities with explicit review labels. COMMON MISTAKE A plain XLOOKUP returns the first match. Its successful result does not establish that the lookup key is unique. INDEPENDENT CROSS-CHECK K1 has two raw rows but one distinct owner. K2 has two distinct owners; P04 has no mapping. EXCEL METHOD On a separate Trusted sheet create K1/Mina, K2/REVIEW_DUPLICATE and K3/Sol after inspecting distinct owners. Use =XLOOKUP(B2,Trusted!$A$2:$A$4,Trusted!$B$2:$B$4,"REVIEW_MISSING",0). Copy opportunity_id and the result into the two-column deliverable. DELIVER A checked output CSV and a handoff note explaining the exception policy. Use setup.sql in SQLite or import each table CSV into your spreadsheet. expected.csv is the complete reference result; an empty CSV field represents SQL NULL. The browser executes SQLite, not Excel formulas. XLOOKUP is unavailable in Excel 2016 and 2019. Sources for function behavior: https://www.sqlite.org/lang_select.html and https://support.microsoft.com/en-us/excel/functions/xlookup-function (checked 2026-11-11). Rates, dates and policies here are exercise assumptions.