How to Find Duplicate Transactions in Google Sheets: Double-Imported Rows, Invoices Paid Twice and Same-Amount Charges Within a Few Days (2026)
Duplicate transactions creep into expense sheets, bookkeeping tabs and bank exports in a few predictable ways: a statement gets pasted in twice, a supplier invoice gets paid twice a few days apart, or the same card charge arrives under two slightly different names. A plain “find duplicates” check either misses these or flags every monthly subscription. This guide gives one tested formula for each kind of duplicate, shows how to list the suspects on a review tab, and explains what is safe to delete.
The short answer
- Rows imported twice: compare every column,
=AND($A2<>"", COUNTIFS($A$2:$A, $A2, $B$2:$B, $B2, $C$2:$C, $C2, $D$2:$D, $D2)>1). - Invoices paid twice: compare vendor and invoice number,
=AND($D2<>"", COUNTIFS($B$2:$B, $B2, $D$2:$D, $D2)>1). - Same charge a few days apart: compare vendor and amount inside a date window,
=AND($A2<>"", COUNTIFS($B$2:$B, $B2, $C$2:$C, $C2, $A$2:$A, ">="&($A2-7), $A$2:$A, "<="&($A2+7))>1). - Use each as a Format › Conditional formatting › Custom formula is rule on A2:D. Only delete exact copies; review everything else.
The example
A small payments log with the date in A (real dates, not text), the vendor in B, the amount in C and the invoice number in D. Cloud Host is a monthly subscription with no invoice number.
| Row | A: Date | B: Vendor | C: Amount | D: Invoice # |
|---|---|---|---|---|
| 2 | 2026-10-01 | Acme Supplies | 125.00 | INV-1001 |
| 3 | 2026-10-02 | Cloud Host | 49.00 | (blank) |
| 4 | 2026-10-03 | Acme Supplies | 125.00 | INV-1001 |
| 5 | 2026-10-05 | Office Mart | 82.40 | INV-0077 |
| 6 | 2026-10-05 | Office Mart | 82.40 | INV-0077 |
| 7 | 2026-10-08 | Acme Supplies | 125.00 | INV-1012 |
| 8 | 2026-11-02 | Cloud Host | 49.00 | (blank) |
| 9 | 2026-10-06 | Print Co | 82.40 | INV-552 |
Rows 5 and 6 are the same payment pasted twice. Rows 2 and 4 are invoice INV-1001 paid twice, two days apart. Row 7 is another Acme payment for the same amount a week later under a new invoice number: maybe a re-issued invoice, maybe a genuine second order, so it needs a look. Rows 3 and 8 are normal monthly charges and should not be flagged. Row 9 is a different vendor that happens to charge the same amount as Office Mart a day later.
| Check | Catches | Flags on the example |
|---|---|---|
| Every column the same | Rows imported twice | 5, 6 |
| Vendor + invoice number | An invoice paid twice, even on different days | 2, 4, 5, 6 |
| Vendor + amount within 7 days | Repeat charges, re-issued invoices | 2, 4, 5, 6, 7 |
| Amount within 1 day, any vendor | Card charges under two different names | 5, 6, 9 |
| Vendor + amount, no date | Too much: also every recurring charge | 2, 3, 4, 5, 6, 7, 8 |
1. Rows imported twice (every column the same)
- Select A2:D (the data without the header).
- Choose Format › Conditional formatting.
- Under Format rules, open Format cells if… and choose Custom formula is.
- Enter the formula below, pick a fill color, and click Done.
=AND($A2<>"", COUNTIFS($A$2:$A, $A2, $B$2:$B, $B2, $C$2:$C, $C2, $D$2:$D, $D2)>1)
COUNTIFS counts the rows where all four columns match the current row; more than 1 means there is another copy. The dollar signs before the column letters keep every cell in the row looking at the same row, so the whole row is colored. On the example rows 5 and 6 are colored. The $A2<>"" part matters: without it, the empty rows below your data match each other and get colored too (see finding duplicates but ignoring blank cells). An empty invoice number is fine here, because blank matches blank only when the other columns match as well.
To color only the second and later copies, so the first one stays plain, make the range grow as it goes down:
=AND($A2<>"", COUNTIFS($A$2:$A2, $A2, $B$2:$B2, $B2, $C$2:$C2, $C2, $D$2:$D2, $D2)>1)
That colors only row 6. More highlight patterns are in the highlight duplicates guide.
2. Invoices paid twice
A paid-twice invoice usually has a different payment date, so the every-column check misses it. Compare the vendor and the invoice number instead:
=AND($D2<>"", COUNTIFS($B$2:$B, $B2, $D$2:$D, $D2)>1)
This flags rows 2 and 4 (INV-1001, paid Oct 1 and Oct 3) and rows 5 and 6. Including the vendor stops two suppliers who both number their invoices INV-1001 from matching each other, and $D2<>"" skips payments that have no invoice number, such as the Cloud Host rows. COUNTIFS ignores letter case, so inv-1001 matches INV-1001, but an extra space or a missing leading zero (INV-77 vs INV-0077) does not; duplicates that don’t match exactly covers cleaning those up.
3. Same vendor, same amount within a few days
The obvious check, vendor plus amount, is too broad:
=AND($A2<>"", COUNTIFS($B$2:$B, $B2, $C$2:$C, $C2)>1)
It flags every row except row 9, including the two Cloud Host subscription charges a month apart. Add a date window so only charges close together match:
=AND($A2<>"", COUNTIFS($B$2:$B, $B2, $C$2:$C, $C2, $A$2:$A, ">="&($A2-7), $A$2:$A, "<="&($A2+7))>1)
The last two criteria keep only rows whose date in column A is no more than 7 days before or after the current row’s date (dates are numbers in Sheets, so $A2-7 is the date a week earlier). On the example this flags rows 2, 4, 5, 6 and 7, and leaves the subscription alone because its charges are 31 days apart. Change both 7s to tighten or widen the window: with 3 days, row 7 is no longer flagged, because it is 5 days after row 4.
To see how many charges fall into each window, put this helper in E2 and fill it down:
=IF($A2="", "", COUNTIFS($B$2:$B, $B2, $C$2:$C, $C2, $A$2:$A, ">="&($A2-7), $A$2:$A, "<="&($A2+7)))
On the example it shows 3 for each Acme Supplies row, 2 for each Office Mart row and 1 everywhere else.
Same amount under a different vendor name
Card and bank exports often show the same merchant under different descriptors, so a vendor match can miss a double charge. This version ignores the vendor and looks for the same amount within one day:
=AND($A2<>"", COUNTIFS($C$2:$C, $C2, $A$2:$A, ">="&($A2-1), $A$2:$A, "<="&($A2+1))>1)
It flags rows 5, 6 and 9. Row 9 is a different shop, which shows why this check is noisier: use it to find candidates, not to decide. It works best on larger, less common amounts.
List the suspects on a review tab
Colors are easy to miss on a long sheet. On a new tab, put this formula in A2 (and copy the header row into row 1):
=SORT(FILTER(A2:D, A2:A<>"", COUNTIFS(B2:B, B2:B, C2:C, C2:C, A2:A, ">="&(A2:A-7), A2:A, "<="&(A2:A+7))>1), 2, TRUE, 1, TRUE)
It returns every row that the 7-day check flags, sorted by vendor and then date, so each group sits together: the three Acme Supplies rows, then the two Office Mart rows. The A2:A<>"" condition keeps empty rows out. The list updates as you add transactions. Format column A of the review tab with Format › Number › Date if the dates show as numbers. Other ways to list duplicate rows are in show only the duplicates.
Remove the copies safely
Only rows that are exact copies (check 1) are safe to remove in bulk:
- Right-click the tab and choose Duplicate, so you have a backup.
- Select the table including the header row (A1:D9 on the example).
- Choose Data › Data cleanup › Remove duplicates, tick Data has header row, and leave every column ticked.
- Click Remove duplicates. On the example only row 6 is removed.
Don’t tick only Vendor and Amount: on the example that would delete rows 4, 6, 7 and 8, including next month’s subscription charge. For paid-twice invoices and date-window matches, check the statement or receipts and delete or annotate those rows by hand; a second payment may need a refund request rather than a deleted row. Google’s Remove duplicates help describes the tool; to keep the newest row per key instead of the first, see keep the latest row.
If you add a new statement to a running ledger every month, check the new rows against the existing ones before pasting them in, as shown in comparing two sheets, or paste them and use the second-copy rule above to spot the overlap.
Pitfalls
- Dates with a time of day. Exports sometimes include times, so two charges on the same day are not equal. Check with Format › Number › Date time. Compare a helper column with
=INT(A2)instead of A, or rely on the date-window formula. - Dates or amounts stored as text. Text dates don’t work with
">="&($A2-7), and an amount stored as text may not match the same amount stored as a number. Convert amounts with a helper such as=VALUE(C2), then Edit › Paste special › Values only; re-enter text dates as real dates and format them with Format › Number › Date. - Extra spaces in vendor names. Office Mart and Office Mart are different to COUNTIFS. Run Data › Data cleanup › Trim whitespace on the vendor column first.
- * and ? in descriptors. COUNTIFS treats them as wildcards (Google’s COUNTIFS help), so a descriptor such as AMZN Mktp US*2K4 can match other text. Check any flagged row before acting on it.
- Refunds. A refund of −82.40 doesn’t match a charge of 82.40, so refunds are never flagged as copies of the charge they reverse.
- Colors are off by one row. The formula’s row (2) must be the first row of the “Apply to range”.
FAQ
How do I find duplicate transactions in Google Sheets?
Decide what counts as a duplicate first. For rows imported twice, compare every column with =AND($A2<>"", COUNTIFS($A$2:$A, $A2, $B$2:$B, $B2, $C$2:$C, $C2, $D$2:$D, $D2)>1) as a Format › Conditional formatting › Custom formula is rule on A2:D. For invoices paid twice, compare vendor and invoice number. For charges that repeat a few days apart, compare vendor and amount inside a date window.
How do I find payments with the same amount within a few days?
Add a date range to COUNTIFS: =AND($A2<>"", COUNTIFS($B$2:$B, $B2, $C$2:$C, $C2, $A$2:$A, ">="&($A2-7), $A$2:$A, "<="&($A2+7))>1), where A is the date, B the vendor and C the amount. Change both 7s to the number of days you want. It flags a row when another row with the same vendor and amount falls within 7 days before or after it.
How do I find invoices that were paid twice?
Use =AND($D2<>"", COUNTIFS($B$2:$B, $B2, $D$2:$D, $D2)>1) with the vendor in B and the invoice number in D. Matching the vendor too stops two suppliers who both use INV-1001 from being flagged, and the D2<>"" check skips rows with no invoice number.
Why do my monthly subscriptions show up as duplicates?
Because a check on vendor and amount alone matches every month’s charge for the same plan. Add a date window (for example 7 days either side) so charges a month apart don’t match each other, or include the date in the check.
Can I delete duplicate transactions with Remove duplicates?
Only exact copies, such as rows from a statement you imported twice. Select the table, choose Data › Data cleanup › Remove duplicates and leave every column ticked. Don’t tick only vendor and amount: that also deletes real repeat purchases and recurring charges. Rows found with a date window are suspects to review, not rows to delete automatically.
Why doesn’t COUNTIFS match dates from my bank export?
The dates may include a time of day, so two charges on the same day are different numbers, or the dates may be text. Check with Format › Number › Date time. Compare a helper column with =INT(A2), or use the date-window formula, which works with date-times as long as the cells hold real dates.
Install free from Google Workspace MarketplaceSee SheetDupes
Want to test it first? Try it on sample data (makes a copy of a 12-row example sheet in your Drive).
Related guides
- How to Find and Remove Duplicates in Google Sheets: Highlight, Count, Delete and Keep the Original (2026)
- How to Highlight Duplicates in Google Sheets: Conditional Formatting Formulas for One Column, Whole Rows, Repeats Only and Two Sheets (2026)
- How to Compare Two Columns or Two Sheets in Google Sheets to Find Matches and Duplicates (2026)
- Duplicates That Don’t Match Exactly in Google Sheets: Case, Extra Spaces, Gmail Dots, Phone Formats and Typos (2026)
- How to Remove Duplicates in Google Sheets but Keep the Latest, First or Highest Row per Key (2026)
- How to Prevent Duplicate Entries in Google Sheets: Data Validation Rules, Warnings and a Small Script (2026)
- How to Count Duplicates in Google Sheets: per Value, Extra Rows, Unique Counts and Why the Numbers Disagree (2026)
- How to Combine Two Lists or Several Tabs in Google Sheets Without Duplicates: VSTACK, UNIQUE, One Row per Key and Other Files (2026)
- How to Merge Duplicate Rows in Google Sheets: Sum the Numbers, Join the Notes and Fill the Blanks (2026)
- UNIQUE vs Remove Duplicates in Google Sheets: Live or Static, Letter Case, Spaces, Columns and Headers (2026)
- How to Remove Duplicates Within a Cell in Google Sheets: Comma-Separated Lists, Tags, Line Breaks and Letter Case (2026)
- How to Show Only the Duplicates in Google Sheets: Filter Duplicate Rows, List Repeated Values and Find Rows That Appear Once (2026)
- How to Find Duplicates Across Multiple Columns in Google Sheets: Rows That Match on Two or More Columns, and Values Repeated Anywhere in a Range (2026)
- How to Remove Duplicates Automatically in Google Sheets: Apps Script on a Daily Timer, on Form Submit or From a Menu (2026)
- How to Find Duplicates in Google Sheets but Ignore Blank Cells: Highlight, Count, List and Remove Without Empty Rows Getting in the Way (2026)
- How to Format Phone Numbers in Google Sheets: Strip Dashes and Spaces, Show (555) 010-1234, Handle +1 and Extensions, Then Find Duplicate Contacts (2026)
- How to Change Text Case in Google Sheets: UPPERCASE, lowercase, Proper Case Names, Sentence Case and Duplicates That Differ Only in Case (2026)