How to Find Duplicate Values in a Column
Identify duplicate values in any product attribute column using Excel's COUNTIF function.
Why This Matters
Finding duplicates helps you:
- Identify products with duplicate EANs, SKUs, or other unique identifiers
- Clean up data quality issues
- Prevent order fulfillment errors
- Maintain data integrity
Prerequisites
- cobby Excel add-in installed
- Products loaded in Excel
- Basic Excel formula knowledge
When to Use This
Use this process when:
- Verifying uniqueness of EAN codes, SKUs, or model numbers
- Cleaning up imported data
- Auditing product data quality
- Investigating sync or order issues
Steps
Step 1: Create Helper Column
- Right-click on the column header next to the column you want to check (e.g., EAN)
- Select Insert from the context menu
- Name the new column (e.g., "Duplicate Check")
Step 2: Add COUNTIF Formula
- Click on the first data cell in your new helper column
- Set the cell format to Standard (not Text)
- Right-click the cell → Format Cells → General
- Enter the COUNTIF formula in the formula bar:
=COUNTIF([Column Range], [Search Criterion])
Example for EAN column:
=COUNTIF(D:D, D2)
Where:
D:Dis the entire EAN columnD2is the current row's EAN value

Step 3: Make Range Absolute
Before copying the formula, make the range absolute using dollar signs:
=COUNTIF($D:$D, D2)
The $ symbols ensure the column range stays fixed when copying the formula down.
Step 4: Apply Formula to All Rows
- Select the cell with the formula
- Click and drag the fill handle (small square at bottom-right corner) down
- Or double-click the fill handle to auto-fill to the last row with data
Step 5: Interpret Results
The formula returns a count of how many times each value appears:
- 1 = Value is unique (no duplicates)
- 2 = Value appears twice (duplicate found)
- 3+ = Value appears three or more times
In the example, an EAN that appears twice will show "2" in both rows where it occurs.
Advanced: Filter and Sort Duplicates
Filter for Duplicates Only
- Click on the helper column header
- Click the filter dropdown arrow
- Uncheck "1" to hide unique values
- Click OK
Now you'll see only rows with duplicate values.
Sort by Duplicate Count
- Select any cell in your data
- Go to Data → Sort
- Sort by your helper column in descending order
- Click OK
This groups all duplicates together, making them easier to review.
Resolving Duplicates
Once you've identified duplicates, you have several options:
Option 1: Correct Data Entry Errors
If duplicates are mistakes:
- Verify which product has the correct value
- Update the incorrect product(s) with unique values
- Save products
Option 2: Identify Duplicate Products
If you have true duplicate products:
- Review both products to determine which to keep
- Consider merging product data
- Delete the duplicate product in Magento
- Update any references (related products, etc.)
Option 3: Generate New Unique Values
For missing or incorrect unique identifiers:
- Generate new unique values (EANs, internal SKUs, etc.)
- Update the affected products
- Re-run the duplicate check to verify
Alternative: Use Excel's Remove Duplicates
For a quick duplicate count without detailed analysis:
- Select the column you want to check
- Copy it to a new sheet
- Go to Data → Remove Duplicates
- Click OK
Excel will tell you how many duplicates were found and removed, giving you a quick count.
Note: This method removes duplicates but doesn't identify which products are affected. Use the COUNTIF method above for detailed analysis.
Checking Multiple Columns
To find products that are duplicates based on multiple criteria (e.g., SKU AND Name):
Method 1: Concatenated Column
- Create a helper column that combines values:
=[@SKU]&"-"&[@Name]
- Use COUNTIF on this combined column:
=COUNTIF($E:$E, E2)
Method 2: COUNTIFS for Multiple Criteria
=COUNTIFS($A:$A, A2, $B:$B, B2)
This counts rows where both column A and column B match the current row.
Troubleshooting
Problem: Formula returns #VALUE! error
Solution: Ensure the cell format is set to Standard or General, not Text. Also verify your column references are correct.
Problem: All values show "1" even though duplicates exist
Solution: Check that your formula range covers all rows. Use entire column reference (e.g., $D:$D) instead of a limited range.
Problem: Formula slows down Excel significantly
Solution: If you have many products, use a limited range instead of entire columns:
=COUNTIF($D$2:$D$10000, D2)
Problem: Duplicates appear but values look different
Solution: You may have invisible spaces or formatting differences. Use the TRIM function first:
=COUNTIF($D:$D, TRIM(D2))
Related Articles
- How to Remove Spaces from SKUs (coming soon)
- Data Quality Best Practices (coming soon)