Skip to content
xlsoffice. All Rights Reserved
  • Home
  • Excel For Beginners
  • Excel Intermediate
  • Advanced Excel For Experts

Lookup and Reference Examples

  • How to create dynamic named range with OFFSET in Excel
  • How to get last row in text data in Excel
  • Merge tables with VLOOKUP in Excel
  • How to use Excel VLOOKUP Function
  • How to get last row in numeric data in Excel

Data Analysis Examples

  • Conditional Formatting Color Scales Examples in Excel
  • Everything about Charts in Excel
  • Understanding Anova in Excel
  • How to count table columns in Excel
  • Conditional Formatting Icon Sets Examples in Excel

Data Validation Examples

  • Excel Data validation must contain specific text
  • Excel Data validation unique values only
  • Excel Data validation date in next 30 days
  • Excel Data validation date in specific year
  • Excel Data validation must begin with

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.

Worked Example:   COUNTIF function: Description, Usage, Syntax, Examples and Explanation

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.

Worked Example:   Count cells not equal to many things in Excel

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.

Worked Example:   Summary count with percentage breakdown in Excel

Post navigation

Previous Post:

Excel Data validation specific characters only

Next Post:

Excel Data validation whole percentage only

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
  • CONCAT function: Description, Usage, Syntax, Examples and Explanation
  • T function: Description, Usage, Syntax, Examples and Explanation
  • How to calculate Number of Instances in Excel
  • EXACT function: Description, Usage, Syntax, Examples and Explanation
  • How to extract word containing specific text in Excel
  • How to calculate nth day of year in Excel
  • How to calculate quarter from date in Excel
  • Convert decimal seconds to Excel time
  • Calculate expiration date in Excel
  • How to calculate Day of the Year in Excel
  • PDURATION function: Description, Usage, Syntax, Examples and Explanation
  • COUPDAYBS function: Description, Usage, Syntax, Examples and Explanation
  • Calculate payment periods for loan in Excel
  • IRR function: Description, Usage, Syntax, Examples and Explanation
  • COUPDAYSNC function: Description, Usage, Syntax, Examples and Explanation
Acronyms, Abbreviations, Initialism & What They Stand For
© 2021 xlsoffice. All Rights Reserved | Teal Smiles