Apply data validation to cells

Applies to: Excel for Office 365, Excel for Office 365 for Mac, Excel for the web, Excel 2019, Excel 2016, Excel 2019 for Mac, Excel 2013, Excel 2010, Excel 2007, Excel 2016 for Mac, Excel for Mac 2011, Excel Starter 2010.

You can use data validation to restrict the type of data or the values that users enter into a cell. One of the most common data validation uses is to create a drop-down list.


Download our examples

Download an example workbook with all data validation examples in this article

  1. Select the cell(s) you want to create a rule for.
  1. Select Data >Data Validation.   
Data Validation
  1.   On the Settings tab, under Allow, select an option:
  • Whole Number – to restrict the cell to accept only whole numbers.
  • Decimal – to restrict the cell to accept only decimal numbers.

List – to pick data from the drop-down list.

  • Date – to restrict the cell to accept only date.
  • Time – to restrict the cell to accept only time.
  • Text Length – to restrict the length of the text.
  • Custom – for custom formula.
  1.  Under Data, select a condition:
  • between
  • not between
  • equal to
  • not equal to
  • greater than
  • less than
  • greater than or equal to
  • less than or equal to
  1. On the Settings tab, under Allow, select an option:
  1. Set the other required values, based on what you chose for Allow and Data. For example, if you select between, then select the Minimum: and Maximum: values for the cell(s).
  1. Select the Ignore blank checkbox if you want to ignore blank spaces.
  1. If you want to add a Title and message for your rule, select the Input Message tab, and then type a title and input message.
  1. Select the Show input message when cell is selected checkbox to display the message when the user selects or hovers over the selected cell(s).
  1. Select OK. Now, if the user tries to enter a value that is not valid, a pop-up appears with the message, “This value doesn’t match the data validation restrictions for this cell.”

Need more help?

You can always ask an expert in the Excel Tech Community, get support in the Answers community, or suggest a new feature or improvement on Excel User Voice.

See Also

More on data validation

Add or remove items from a drop-down list

Remove a drop-down list

Leave a Reply

%d bloggers like this: