---
title: "Block duplicates | PracticeExcel"
description: "Practice a data validation rule in Excel that blocks duplicate entries, with COUNTIF. Checked as you type."
canonical_url: "https://practiceexcelonline.com/practice/data-validation/block-duplicates"
locale: en
meta:
  "og:description": "Practice a data validation rule in Excel that blocks duplicate entries, with COUNTIF. Checked as you type."
  "og:image": "https://practiceexcelonline.com/_og/d/c_Page%2Ctitle_Block%2Bduplicates%2Cdescription_~UHJhY3RpY2UgYSBkYXRhIHZhbGlkYXRpb24gcnVsZSBpbiBFeGNlbCB0aGF0IGJsb2NrcyBkdXBsaWNhdGUgZW50cmllcywgd2l0aCBDT1VOVElGLiBDaGVja2VkIGFzIHlvdSB0eXBlLg%2Ceyebrow_Drop-down%2Blists%2Band%2Bdata%2Bvalidation%2Csite_practiceexcel%2Cprops_eyJncmlkIjp7ImNvbHMiOlsiQSIsIkIiLCJDIl0sInJvd3MiOlt7Im4iOjEsImNlbGxzIjpbIkN1c3RvbWVyIElEIiwiTmFtZSIsIlJ1bGUiXX0seyJuIjoyLCJjZWxscyI6WyIxMDA1IiwiQW5uZSBIb2xtIiwiIl19LHsibiI6MywiY2VsbHMiOlsiMTAwMiIsIkpvbmFzIEJlcmciLCIiXX0seyJuIjo0LCJjZWxscyI6WyIxMDAxIiwiTWV0dGUgTHVuZCIsIiJdfSx7Im4iOjUsImNlbGxzIjpbIjEwMDMiLCJBbGkgS2hhbiIsIiJdfSx7Im4iOjYsImNlbGxzIjpbIjEwMDQiLCJTYXJhIEp1aGwiLCIiXX1dLCJ0YXJnZXQiOlsxLDJdfX0%2Cp_Ii9wcmFjdGljZS9kYXRhLXZhbGlkYXRpb24vYmxvY2stZHVwbGljYXRlcyI%2Cs_bw5rByWdtWvH2bCT.png"
  "og:image:height": "600"
  "og:image:type": image/png
  "og:image:width": "1200"
  "og:title": "Block duplicates | PracticeExcel"
  "twitter:image": "https://practiceexcelonline.com/_og/d/c_Page%2Ctitle_Block%2Bduplicates%2Cdescription_~UHJhY3RpY2UgYSBkYXRhIHZhbGlkYXRpb24gcnVsZSBpbiBFeGNlbCB0aGF0IGJsb2NrcyBkdXBsaWNhdGUgZW50cmllcywgd2l0aCBDT1VOVElGLiBDaGVja2VkIGFzIHlvdSB0eXBlLg%2Ceyebrow_Drop-down%2Blists%2Band%2Bdata%2Bvalidation%2Csite_practiceexcel%2Cprops_eyJncmlkIjp7ImNvbHMiOlsiQSIsIkIiLCJDIl0sInJvd3MiOlt7Im4iOjEsImNlbGxzIjpbIkN1c3RvbWVyIElEIiwiTmFtZSIsIlJ1bGUiXX0seyJuIjoyLCJjZWxscyI6WyIxMDA1IiwiQW5uZSBIb2xtIiwiIl19LHsibiI6MywiY2VsbHMiOlsiMTAwMiIsIkpvbmFzIEJlcmciLCIiXX0seyJuIjo0LCJjZWxscyI6WyIxMDAxIiwiTWV0dGUgTHVuZCIsIiJdfSx7Im4iOjUsImNlbGxzIjpbIjEwMDMiLCJBbGkgS2hhbiIsIiJdfSx7Im4iOjYsImNlbGxzIjpbIjEwMDQiLCJTYXJhIEp1aGwiLCIiXX1dLCJ0YXJnZXQiOlsxLDJdfX0%2Cp_Ii9wcmFjdGljZS9kYXRhLXZhbGlkYXRpb24vYmxvY2stZHVwbGljYXRlcyI%2Cs_bw5rByWdtWvH2bCT.png"
---

> Index of every page on this site: [llms.txt](https://practiceexcelonline.com/llms.txt)

# **Block duplicates**

**Premium**

Each customer ID may only be used once. The rule is set on A2:A6 and written for A2. In C2, count how many times A2 appears in A2:A6 with COUNTIF and test that it is exactly 1. Lock the list with $.

C2fx

|  | A | B | C | D | E | F |
| --- | --- | --- | --- | --- | --- | --- |
| 1 | Customer ID | Name | Rule |  |  | |
| 2 | 1005 | Anne Holm |  |  |  | |
| 3 | 1002 | Jonas Berg |  |  |  | |
| 4 | 1001 | Mette Lund |  |  |  | |
| 5 | 1003 | Ali Khan |  |  |  | |
| 6 | 1004 | Sara Juhl |  |  |  | |
| 7 |  |  |  |  |  | |
| 8 |  |  |  |  |  | |

**Premium lesson**

## **Unlock Drop-down lists and data validation and every other lesson**

This is a premium lesson. Premium lets you solve it and every other lesson, take the timed mock tests, and earn certificates you can share on LinkedIn.

Next with premium:**COUNTIF****SUMIF**

[**See plans, from $5/month**](https://practiceexcelonline.com/pricing) [**Already premium? Sign in**](https://practiceexcelonline.com/login?next=/practice/data-validation/block-duplicates)

Need help?

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://practiceexcelonline.com/#identity","@type":"Organization","name":"PracticeExcel","url":"https://practiceexcelonline.com/","logo":{"@id":"https://practiceexcelonline.com/#logo"}},{"@id":"https://practiceexcelonline.com/#website","@type":"WebSite","inLanguage":"en-US","name":"PracticeExcel","url":"https://practiceexcelonline.com/","alternateName":["Practice Excel Online","PracticeExcelOnline.com"],"publisher":{"@id":"https://practiceexcelonline.com/#identity"},"workTranslation":{"@id":"https://excelopgaver.dk/#website"}},{"@id":"https://practiceexcelonline.com/practice/data-validation/block-duplicates#webpage","@type":"WebPage","description":"Practice a data validation rule in Excel that blocks duplicate entries, with COUNTIF. Checked as you type.","name":"Block duplicates","url":"https://practiceexcelonline.com/practice/data-validation/block-duplicates","breadcrumb":{"@id":"https://practiceexcelonline.com/practice/data-validation/block-duplicates#breadcrumb"},"isPartOf":{"@id":"https://practiceexcelonline.com/#website"},"potentialAction":[{"@type":"ReadAction","target":["https://practiceexcelonline.com/practice/data-validation/block-duplicates"]}],"primaryImageOfPage":{"@id":"https://practiceexcelonline.com/#logo"}},{"@id":"https://practiceexcelonline.com/practice/data-validation/block-duplicates#breadcrumb","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","name":"Home","item":"https://practiceexcelonline.com","position":1},{"@type":"ListItem","name":"Excel practice exercises","item":"https://practiceexcelonline.com/practice","position":2},{"@type":"ListItem","name":"Drop-down lists and data validation","item":"https://practiceexcelonline.com/practice/data-validation","position":3},{"@type":"ListItem","name":"Block duplicates","position":4}]},{"@id":"https://practiceexcelonline.com/practice/data-validation/block-duplicates#/schema/learning-resource/1","@type":"LearningResource","description":"Practice a data validation rule in Excel that blocks duplicate entries, with COUNTIF. Checked as you type.","educationalLevel":"intermediate","isAccessibleForFree":false,"learningResourceType":"exercise","name":"Block duplicates","teaches":"Drop-down lists and data validation"},{"@id":"https://practiceexcelonline.com/#logo","@type":"ImageObject","caption":"PracticeExcel","contentUrl":"https://practiceexcelonline.com/brand/practiceexcel/icon-512.png","inLanguage":"en-US","url":"https://practiceexcelonline.com/brand/practiceexcel/icon-512.png"}]}
```

## Sitemap

See the full [sitemap](https://practiceexcelonline.com/sitemap.md) for all pages.
