Matching remittance advice to Xero invoices in Excel: the VLOOKUP method, and where it silently breaks
Every bookkeeper who handles bulk payments eventually builds the spreadsheet: remittance lines down one side, open Xero invoices down the other, a lookup formula in the middle. Done carefully, it genuinely works, and it is dramatically better than eyeballing a 6-page PDF against the sales ledger. This is the complete method — and, just as important, the four places where a lookup produces a confident wrong answer instead of an error.
Set up: two tables, one workbook
- Sheet 1 — the remittance: one row per line, with the payer's reference and the amount paid. If the remittance is a PDF, this is the slow part; copy carefully and spot-check the row count and the total.
- Sheet 2 — open invoices from Xero: Business, then Invoices, filter Awaiting Payment, Export. Keep the invoice number, contact, and amount due columns.
- Somewhere visible: the deposit total from the bank line. Every check in this method ultimately answers to that number.
Step one: normalise both reference columns
Lookups fail on formatting long before they fail on substance. The payer writes 'inv 0042', 'INV-42' or 'Invoice #42'; Xero has 'INV-0042'. Build a helper column on both sheets that reduces every reference to its comparable core: uppercase it, strip spaces and punctuation, drop a leading INV or similar prefix, and drop leading zeros. In Excel that is a chain like SUBSTITUTE, UPPER and TEXTJOIN, or a single formula in modern Excel using LET. Match on the helper columns, never on the raw text.
Step two: the lookup
On the remittance sheet, look up each normalised reference in the invoice sheet's normalised column and return the invoice number and amount due. Use XLOOKUP if your Excel has it — it defaults to exact match and returns a clean #N/A when nothing matches. If you must use VLOOKUP, always end the formula with FALSE for exact match; approximate match on reference data is how invoices get paired with the wrong ledger entirely.
Then add the check column that most spreadsheets skip: does the amount paid equal the amount due on the matched invoice? A reference hit with a different amount is not a match — it is a part-payment, a deduction, or a wrong pairing, and it needs a human decision, not a formula's benefit of the doubt.
Step three: prove the total before you touch Xero
Sum the matched amounts. Sum the unmatched remittance lines. Matched plus unmatched must equal the remittance total, and the remittance total must equal the bank deposit. If those numbers do not agree to the cent, something was mis-copied or double-counted, and finding it now costs minutes; finding it after posting costs an afternoon of reversals. Only when the proof holds do you go to Xero and record the batch.
The four places this silently breaks
1. Duplicate references — the lookup returns the first, not the right one
VLOOKUP and XLOOKUP return the first row that matches. If two invoices normalise to the same reference — a re-issued invoice, a credit note sharing the original's number, or a payer who quotes their own PO on multiple lines — the formula happily returns one of them with no warning. Defend against it: a COUNTIF on the normalised column flags any reference that appears more than once, and every flagged row goes to manual review.
2. Part-payments pass the reference test and fail the intent
A remittance line of $1,170.00 against an invoice due $2,340.00 will match on reference and look green in a spreadsheet that only checks references. Without the amount-equality column, the shortfall surfaces weeks later as a mysterious open balance. Every reference match with unequal amounts is a decision: part-payment, negotiated deduction, or error.
3. Negative lines are not payments
NDIS plan managers and large wholesalers routinely include negative lines — rejected claims, returned stock, prior credits taken. A lookup treats them like any other row, and if you post the batch with negatives netted in, your payment record no longer describes what happened. Negatives belong in Xero's credit note workflow, allocated deliberately, not netted silently into a deposit.
4. The spreadsheet has no memory
The formula tells you what matched, never why, and next month it starts from zero. There is no audit trail a reviewer can follow, no record that last month this payer's references needed the PO stripped, no accumulated knowledge at all. That is fine at ten lines a month. At two hundred lines with three payers on different reference conventions, the spreadsheet becomes a role — one only its author can perform.
An honest verdict
For a clean remittance of a few dozen well-referenced lines, the Excel method above is genuinely good, and the totals proof makes it safe. What it cannot give you is judgement at scale: duplicate detection you cannot forget to run, part-payment and credit handling by rule rather than by vigilance, and an audit trail that explains every pairing. If your remittances have crossed that line, the fix is not a cleverer formula — it is a process where the matching is deterministic, every match carries its reason, and nothing posts until the allocation is proven to the cent.
Have a remittance that never ties out cleanly? Email one redacted copy plus an export of your open invoices to support@tothecent.app and we will send back a free matched report, line by line, balanced to the cent, within 48 hours.
Email support@tothecent.appFree matched report
Prove us wrong with your worst remittance.
Email one redacted remittance and an export of your open Xero invoices. We send back the matched report, line by line, balanced to the cent, within 48 hours. Free.
Email support@tothecent.app