EXCEL / FINANCE INTERVIEW PRACTICE / 10 MIN
Match invoices to customer records with XLOOKUP
You have an invoice export and a customer master list. Enrich each invoice with a segment, then flag transactions that cannot be matched.
Download the Excel workbookRequires an Excel version that supports XLOOKUP, such as Microsoft 365 or Excel for the web.
Your task
- Use Customer ID to match each invoice to the Customer Master. Return the customer segment in the Invoice Export sheet.
- Return Unmatched if an ID is missing. Use an exact match, not approximate matching.
- Count unmatched invoice rows, then total the unmatched amount and the Enterprise amount.
- Count repeat invoices as separate rows and leave credit notes as negative values.
Show a hint
The invoice Customer ID is the lookup value. Lock both customer master ranges using dollar signs so they stay fixed when you fill the formula down. The answer `Unmatched` is not zero.
Check your answers
Reveal worked answer
Enter the formula in E5 of Invoice Export and fill through E20. Count Unmatched in the segment column with COUNTIF, and sum Invoice Amount by segment with SUMIF. Three unmatched rows include one repeated customer ID.
=XLOOKUP(C5,'Customer Master'!$B$5:$B$12,'Customer Master'!$D$5:$D$12,"Unmatched",0)- Unmatched invoice rows: 3
- Unmatched invoice amount (USD): 1,615
- Enterprise invoice amount (USD): 3,730