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
| Vendor | Invoice | Date | Amount |
|---|---|---|---|
| PackCo | P-881 | 2026-09-02 | 412.5 |
| PackCo | P-881 | 2026-09-02 | 412.5 |
| Fleet Ltd | F-19 | 2026-09-05 | 180 |
| Fleet Ltd | F-20 | 2026-09-06 | 180 |
| Print Hub | PH-7 | 2026-09-09 | 96 |
Exact duplicates
=COUNTIFS([Vendor], [@Vendor], [Invoice], [@Invoice], [Amount], [@Amount]) > 1SELECT vendor, invoice, amount, COUNT(*) AS times
FROM bills
GROUP BY vendor, invoice, amount
HAVING COUNT(*) > 1;| vendor | invoice | amount | times |
|---|---|---|---|
| PackCo | P-881 | 412.5 | 2 |
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;| vendor | invoice | other_invoice | amount |
|---|---|---|---|
| Fleet Ltd | F-19 | F-20 | 180 |
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
| Finding | Invoices | Amount at risk | Action |
|---|---|---|---|
| Exact duplicate | PackCo P-881 ×2 | 412.5 | Pay once, void the second entry |
| Near duplicate | Fleet Ltd F-19 / F-20 | 180 | Check 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
| Symptom | Cause | Fix |
|---|---|---|
| Hundreds of near duplicates | Fixed monthly fees (rent, subscriptions) | Exclude recurring vendors or widen to amount + description |
| Exact duplicates missed | Amounts differ by rounding (412.5 vs 412.50 as text) | Convert amounts to numbers and round to 2 decimals |
| Same supplier under two names | Duplicate vendor records | Group 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.