Flag Duplicate Invoice Numbers in Google Sheets Before Sending Reminders

Cover: AI illustration. The examples below use fictional data.

A client appears twice in your invoice tracker. Before sending another payment reminder, you need to know whether those rows represent two invoices or one invoice entered twice.

Google Sheets can highlight repeated invoice numbers automatically, giving you a visible review step before you follow up.

Start with one invoice per row

Use column A for the invoice ID, B for the client, C for the due date and D for payment status. This example assumes invoice IDs should be unique across the tracker.

Illustrative invoice tracker with both INV-1042 rows highlighted and INV-1043 unhighlighted
Illustrative data. Both matching IDs are highlighted; the graphic is not a Google Sheets screenshot.

Add the highlighting rule

On a computer, select A2:D1000, then open Format → Conditional formatting. Under Format cells if, choose Custom formula is. Enter this formula, choose an amber fill and click Done:

=AND($A2<>"",COUNTIF($A$2:$A$1000,$A2)>1)

Google documents duplicate highlighting with COUNTIF and whole-row formatting with a custom formula. This example combines those approaches and excludes blank IDs. [1]

Explanatory desktop guide showing the selected range, conditional formatting menu, custom formula and amber fill
An explanatory setup guide based on Google Help. Copy the formula from the text above.

Understand the signal

COUNTIF counts matching IDs. When the count exceeds one, the corresponding row meets the rule. Both INV-1042 rows in the example should be highlighted; INV-1043 should remain unhighlighted.

The function is case-insensitive, so IDs differing only by capitalization are counted together. Use IDs made from letters, numbers and hyphens for this simple setup: an asterisk (*) or question mark (?) has a special meaning in COUNTIF criteria. [2]

Review before removing anything

Compare each highlighted row with the original invoice. A repeated ID could be an accidental duplicate, an installment record or a credit-related entry. If different clients legitimately share invoice numbers, invoice ID alone is not a suitable unique key.

Highlight → check the original → decide what to do.
This rule does not delete rows, confirm an error or stop reminder emails.

If you later automate reminders, add a separate check that holds questionable records for review. The range here ends at row 1000, so extend both ranges as the tracker grows.

This example follows official documentation. It has not been run in your live spreadsheet, and it does not describe a newly released feature.


Official sources

  1. Google Help — Use conditional formatting rules in Google Sheets
  2. Google Help — COUNTIF

Sources checked October 19, 2026. Both are maintained help pages without a visible publication date.

1 thought on “Flag Duplicate Invoice Numbers in Google Sheets Before Sending Reminders”

Leave a comment