Analistable

Have any suppliers billed us twice?

By the Analistable team · Updated · 3 min read

Look for two kinds of duplicate: exact (same vendor, invoice number and amount — usually entered twice) and near (same vendor and amount within a few days but different invoice numbers — often a re-sent invoice). A COUNTIFS on vendor + invoice + amount finds the first; a self-join on vendor + amount with a date window finds the second.

Part of our guide: How to answer questions across multiple spreadsheets

The data

Supplier invoices, September
VendorInvoiceDateAmount
PackCoP-8812026-09-02412.5
PackCoP-8812026-09-02412.5
Fleet LtdF-192026-09-05180
Fleet LtdF-202026-09-06180
Print HubPH-72026-09-0996

Exact duplicates

=COUNTIFS([Vendor], [@Vendor], [Invoice], [@Invoice], [Amount], [@Amount]) > 1
SELECT vendor, invoice, amount, COUNT(*) AS times
FROM bills
GROUP BY vendor, invoice, amount
HAVING COUNT(*) > 1;
Result
vendorinvoiceamounttimes
PackCoP-881412.52

Near duplicates

SELECT a.vendor, a.invoice, b.invoice AS other_invoice, a.amount
FROM bills a
JOIN bills b ON a.vendor = b.vendor
            AND a.amount = b.amount
            AND a.invoice < b.invoice
            AND ABS(julianday(a.inv_date) - julianday(b.inv_date)) <= 7;
Result
vendorinvoiceother_invoiceamount
Fleet LtdF-19F-20180

F-19 and F-20 may both be genuine (two weekly deliveries at the same price) — near duplicates need a human check, not an automatic block.

Normalise first

  • Invoice numbers typed differently (“P-881”, “P881”, “p-881 ”) hide exact duplicates. Remove spaces, dashes and case before comparing.
  • The same supplier set up twice under slightly different names: group by bank account or VAT number as well as name.
  • Run the check before payment runs, not after — recovering a duplicate payment takes far longer.

Ask it in Analistable: “List supplier invoices with the same vendor and amount within 7 days of each other.” More on reconciling payables: three-way match.

In Google Sheets

Helper column E: =COUNTIFS(A$2:A, A2, B$2:B, B2, D$2:D, D2)
Duplicates:      =FILTER(A2:D, E2:E > 1)

Google Sheets' QUERY has no HAVING clause, so count with COUNTIFS in a helper column and filter on it. The same helper works in Excel.

Prevent it next time

  • Make vendor + invoice number a unique key in your accounts payable system, so the second entry is rejected.
  • Ask suppliers to send invoices to one mailbox only — duplicates often come from the same PDF sent to two people.

Normalise invoice numbers in one formula

Clean invoice =UPPER(SUBSTITUTE(SUBSTITUTE(TRIM([@Invoice]), "-", ""), " ", ""))
Key           =[@Vendor] & "|" & [@[Clean invoice]] & "|" & [@Amount]
Duplicate?    =COUNTIF([Key], [@Key]) > 1

“P-881”, “P881” and “p-881 ” all become P881, so the exact-duplicate check catches them. The combined key also works in older Excel versions: select the Key column and use Home › Conditional Formatting › Highlight Cells Rules › Duplicate Values for a visual check.

Value at risk in the example

September findings
FindingInvoicesAmount at riskAction
Exact duplicatePackCo P-881 ×2412.5Pay once, void the second entry
Near duplicateFleet Ltd F-19 / F-20180Check delivery notes before paying

Of September's 1,281 in supplier invoices (412.5 + 412.5 + 180 + 180 + 96), 412.5 is a confirmed duplicate and up to 180 more needs checking. Sum these figures each month to show the value of the control.

Checking across files and periods

Duplicates often straddle months: an invoice entered in August and again in September never shows up in a single month's check. Stack at least the last three months of supplier invoices before running both queries, and add the payments export to see which duplicates were actually paid twice — those need a refund request, the others only a correction.

Troubleshooting

Common problems
SymptomCauseFix
Hundreds of near duplicatesFixed monthly fees (rent, subscriptions)Exclude recurring vendors or widen to amount + description
Exact duplicates missedAmounts differ by rounding (412.5 vs 412.50 as text)Convert amounts to numbers and round to 2 decimals
Same supplier under two namesDuplicate vendor recordsGroup by VAT number or bank details

Frequently asked questions

How do I find duplicate invoices in Excel?
Use COUNTIFS on vendor, invoice number and amount; any count above 1 is a duplicate.
How do I find invoices re-sent with a new number?
Compare invoices from the same vendor with the same amount within a few days of each other.
Should near-duplicates be blocked automatically?
No — recurring charges can legitimately repeat. Flag them for review.
How far back should I check?
At least three months, stacked together, because duplicates are often entered in different months.
How do I check whether a duplicate was paid twice?
Join the duplicates to the payments export on vendor and invoice number and count payments per invoice.

Related guides