Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Using Data Validation.

Using Data Validation

Written by Allen Wyatt (last updated May 29, 2021)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365


One of the tools provided with Excel allows you to ensure that the data in your workbook is within specific bounds, and therefore of a higher quality than unchecked data. This tool is referred to as data validation and it allows you to set the bounds applicable to your data.

For example, let's assume you are creating a simple worksheet to calculate the future value of a sum, and that in order to do so, you need input from the user (regular deposit, interest rate, and months). You may want to place limits on the information which can be used in the worksheet. For example, you may want to make sure the user always enters an interest rate between 2.5% and 25%. Follow these steps:

  1. Select the cell where the user enters the interest rate.
  2. Display the Data tab of the ribbon.
  3. Click the Data Validation tool in the Data Tools group. Excel displays the Data Validation dialog box. (See Figure 1.)
  4. Figure 1. The Data Validation dialog box.

  5. Use the Allow drop-down list to specify what type of number you want to allow. In this instance choose the Decimal option, indicating that you want the user to be able to enter a decimal value. The dialog box changes a bit so you can specify the type of data to be entered.
  6. Use the Data drop-down list to specify how you want the information entered by the user to be compared in your validation rule. You can pick settings such as "between" and "greater than." In this case, you should choose "between," since you want to specify a range for the interest rate.
  7. Specify a minimum and maximum acceptable value for the cell. In the case of this example, the minimum should be .025 (which can also be entered as =2.5%) and the maximum should be .25 (which can be entered as =25%).
  8. Click on the OK button.

Effectively, you have set a validation rule that says "accept any decimal value that is between 2.5% and 25%." If the user tries to add information to the cell that is outside the range you specified, they are notified that they have made an error and a different value must be entered.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (11494) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365. You can find a version of this tip for the older menu interface of Excel here: Using Data Validation.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Updating Automatic Links

Normally, Word updates links within your document when you first open the document. If you don't want Word to do this, ...

Discover More

Converting Text Case

Ever notice that if someone types in all CAPS, it appears they are shouting? If your worksheets include lots of text, you ...

Discover More

Keeping a Replace Operation Displayed

The Find and Replace tool is designed to help you find and replace information as quickly as possible. However, you may ...

Discover More

Professional Development Guidance! Four world-class developers offer start-to-finish guidance for building powerful, robust, and secure applications with Excel. The authors show how to consistently make the right design decisions and make the most of Excel's powerful features. Check out Professional Excel Development today!

More ExcelTips (ribbon)

Answering Questions in Order

It is not unusual to use Excel to gather the answers to users' questions. If you want your users to answer your questions ...

Discover More

Limiting Entry of Prior Dates

Want to establish a "bottom limit" on what dates can be entered in a cell? This tip presents two different ways you can ...

Discover More

Adding Pop-Up Documentation to a Cell

Want to have a small help screen pop up when a user selects a particular cell? This can be done by using data validation, ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is four minus 0?

There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)


This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.