What you will build
Detect duplicate customer IDs before sending a campaign. This lesson uses fictional sample data so you can reproduce each action.
Learning objective
Complete the steps using the dataset below, explain why the feature or formula is used, and recognize issues when inputs change.
Prepare the sample data
Paste this example as tab-separated values beginning at A1 on a new worksheet:
Practice in your own copy
Make your own Google Sheets copy with the same data, formulas, formatting, filter and frozen header. The original remains unchanged.
Sign in to Google. If the original is not publicly shared, download the full workbook and import it into Google Sheets, or paste the example data into your own sheet.
Work through the example
Step 1: Keep the raw ID column unchanged in A2:A5.
Step 2: Enter =COUNTIF($A$2:$A$5,A2)>1 in H2, then fill the formula down through H5. The expected flags are TRUE, FALSE, TRUE, FALSE.
Formula to try
In the verified practice workbook, enter the formula in H2, then fill it down through H5. Keep A2:A5 unchanged and compare H2:H5 with the checkpoint.
=COUNTIF($A$2:$A$5,A2)>1Checkpoint
| Customer ID | Name | Duplicate? |
|---|---|---|
| C01 | An | TRUE |
| C02 | Binh | FALSE |
| C01 | An Nguyen | TRUE |
| C03 | Chi | FALSE |
Expected result after filling the formula through H5: TRUE, FALSE, TRUE, FALSE. If the whole dataset lands in one cell, undo, select A1, and paste the tab-separated data again.
Common mistake and correction
If the result is unexpected, inspect the source cells, destination and referenced range in the formula. Duplicate IDs do not necessarily mean duplicate people; investigate spelling changes and imported leading zeros before deleting anything.
Independent practice
After following the example, complete this variation without editing the source data: Filter the TRUE flags and decide a documented resolution for each duplicate instead of removing whole rows blindly.
Key takeaways
- ✓Detect duplicate customer IDs before sending a campaign.
- ✓Keep the raw ID column unchanged in A2:A5.
- ✓Fill the duplicate-check formula from H2 through H5; the sample returns TRUE, FALSE, TRUE, FALSE.
- ✓Duplicate IDs do not necessarily mean duplicate people; investigate spelling changes and imported leading zeros before deleting anything.
- ✓Filter the TRUE flags and decide a documented resolution for each duplicate instead of removing whole rows blindly.
Check your understanding
Answer four questions about the practice sheet.
Continue learning
Previous lesson: Combine data from multiple sheets; Next lesson: Remove blank rows.
Comments
No comments yet. Be the first to join the discussion.