Data validation is a crucial feature in Google Sheets that ensures data integrity by controlling the type and format of data entered into cells. One important use of data validation is to ensure that each cell in a range contains a unique value. In this article, we’ll guide you through setting up data validation in Google Sheets to allow only unique values in a specified range.

Why Use Unique Value Validation?

Unique value validation helps to:

  • Prevent duplicate entries, which can be critical for data accuracy.
  • Maintain the integrity of datasets where each entry must be distinct, such as IDs or usernames.
  • Simplify data management by ensuring all values are unique.

Step-by-Step Instructions

Let’s set up data validation to ensure that each cell in a specified range contains a unique value.

Step 1: Open Your Google Sheet
  1. Open Google Sheets and either create a new sheet or open an existing one where you want to ensure unique values.
Step 2: Select the Range of Cells
  1. Click and drag to select the range of cells where you want to restrict input to unique values. For example, select cells A1 to A10.
Step 3: Open the Data Validation Menu
  1. With your range selected, go to the top menu and click on Data.
  2. From the drop-down menu, select Data validation.
Step 4: Set Up the Custom Formula for Unique Values
  1. In the Data Validation dialog box, under the Criteria section, select Custom formula is.
  2. Enter the following formula: =COUNTIF($A$1:$A$10, A1)=1. This formula checks that each value in the range A1 to A10 appears only once.
Step 5: Customize the Validation Settings
  1. Optionally, check the box for Show validation help text and enter a message like "Please enter a unique value". This message will guide users on the acceptable input.
  2. Choose either Show warning to alert users when they enter a duplicate value but still allow it, or Reject input to prevent duplicate data entirely.
Step 6: Save the Data Validation Rules
  1. Click Save to apply the data validation rules to the selected range.

Data Entry and Examples

Now, when you or anyone else tries to enter data in the selected range, Google Sheets will enforce the rule that each value must be unique.

For example:

  • Valid Input: Entering 123, ABC, and XYZ in any of the selected cells will be accepted if none of these values are repeated.
  • Invalid Input: Entering 123 twice in the range will prompt a warning or be rejected, depending on your validation settings.
Example Data

Here’s how your data might look:

A
101
202
303
404
505
-
-

In this example, the cells with dashes are ready for unique entries. If a user tries to enter a duplicate value, such as 202 again, Google Sheets will either show a warning or reject the input.

Conclusion

Using data validation to ensure unique values is an effective way to maintain data integrity and ensure consistent data entry in Google Sheets. By following these simple steps, you can create a user-friendly environment that guides users to enter only unique data. This technique is particularly useful for managing lists, databases, and any scenario where duplicate entries need to be avoided.

Mastering data validation techniques like this one helps you create more reliable and efficient Google Sheets documents.

Text and images Copyright © Spreadsheet Templates

Use of this website is under the conditions of our Terms of Service.

Privacy is important and our policy is detailed in our Privacy Policy.

See the Spreadsheet Templates Cookie Policy for our use of cookies and the user options available.