Skip to content
Free Excel Tutorials
  • Home
  • Excel For Beginners
  • Excel Intermediate
  • Advanced Excel For Experts

Data Analysis

  • How to calculate average last N values in a table in Excel
  • How to count table rows in Excel
  • Data Series in Excel
  • Add Outline to Data in Excel
  • Understanding Anova in Excel

References

  • How to get relative column numbers in a range in Excel
  • How to get address of named range in Excel
  • How to use Excel FORMULATEXT function
  • How to use Excel TRANSPOSE Function
  • How to get last row in text data in Excel

Data Validations

  • Excel Data validation exists in list
  • Excel Data validation allow weekday only
  • Excel Data validation specific characters only
  • Prevent invalid data entering in specific cells
  • Excel Data validation only dates between

Excel Data validation unique values only

by

Reject duplicate data entry in a cell range.

To allow only unique values in a given range, you can use data validation with a custom formula based on the COUNTIF function.

Formula

=COUNTIF(range,A1)<2

Note: Cell references in data validation formulas are relative to the upper left cell in the range selected when the validation rule is defined, in this case B5.

Explanation

In the example shown, the data validation applied to C5:C9 is:

=COUNTIF(emails,C5)<2

where emails is the named range C5:C9.

How this formula works

Data validation rules are triggered when a user adds or changes a cell value. In this example, we are using a formula that checks that the input doesn’t already exist in the named range “emails”:

COUNTIF(ids,B5)<2

COUNTIF returns a count of the value in C5 inside the named range emails (C5:C9). If the count is less than 2, the expression returns TRUE and validation succeeds. If not, the expression returns FALSE and validation fails.

Post navigation

Previous Post:

DECIMAL function: Description, Usage, Syntax, Examples and Explanation

Next Post:

AVERAGE function: Description, Usage, Syntax, Examples and Explanation

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Learn Basic Excel

Ribbon
Workbook
Worksheets
Format Cells
Find & Select
Sort & Filter
Templates
Print
Share
Protect
Keyboard Shortcuts

Categories

  • Charts
  • Data Analysis
  • Data Validation
  • Excel Functions
    • Cube Functions
    • Database Functions
    • Date and Time Functions
    • Engineering Functions
    • Financial Functions
    • Information Functions
    • Logical Functions
    • Lookup and Reference Functions
    • Math and Trig Functions
    • Statistical Functions
    • Text Functions
    • Web Functions
  • Excel VBA
  • Excel Video Tutorials
  • Formatting
  • Grouping
  • Others

Logical Functions

  • Nested IF function example in Excel
  • TRUE function: Description, Usage, Syntax, Examples and Explanation
  • OR function: Description, Usage, Syntax, Examples and Explanation
  • XOR function: Description, Usage, Syntax, Examples and Explanation
  • AND function: Description, Usage, Syntax, Examples and Explanation

Date Time

  • Count times in a specific range in Excel
  • Get days before a date in Excel
  • Calculate retirement date in Excel
  • How to join date and text together in Excel
  • Convert decimal seconds to Excel time

Grouping

  • Map text to numbers in Excel
  • How to randomly assign data to groups in Excel
  • Group times into 3 hour buckets in Excel
  • Calculate conditional mode with criteria in Excel
  • Group numbers at uneven intervals in Excel

General

  • Excel Ribbon Quick Overview For Beginners
  • How to add sequential row numbers to a set of data in Excel
  • How to Create Calendar in Excel
  • How to calculate percent variance in Excel
  • How to Insert Cells, Row and Rows in Excel
© 2026 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning