Please Note: This article is written for users of the following Microsoft Excel versions: 97, 2000, 2002, and 2003. If you are using a later version (Excel 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Excel, click here: Specifying a Data Validation Error Message.
by Allen Wyatt
(last updated August 25, 2018)
If someone tries to enter a value into a cell that has a data validation rule defined, and that value is outside the bounds of the validation rule you have specified, they will see an error message. Excel allows you to modify the default error message to provide meaningful information to the user. When used in conjunction with the input message, data validation becomes a very powerful tool in developing worksheets to be used by others.
Figure 1. The Error Alert tab of the Data Validation dialog box.
When the user enters an incorrect value and presses Enter or tries to move to another cell, a dialog box appears with your message.
You should realize that what the user can do once the error message dialog box is displayed is dependent on which error style you chose in step 5. For instance, if you choose the Stop style, the user can only retry their entry or cancel it. (In other words, you are forcing them to put in the right value.) If you choose the Warning style, then they are notified of their error, but they can still continue with the wrong value in the cell. Finally, the Information style is the most gentle reminder of all, and the user can still go on and accept the incorrect entry.
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (2855) applies to Microsoft Excel 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) here: Specifying a Data Validation Error Message.
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!
When using data validation, you may want to reference a list of validation criteria contained on a different worksheet. ...Discover More
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
Data Validation is a great way to limit what a user can enter into a worksheet cell. It may not stop a cell from being ...Discover More
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Got a version of Excel that uses the menu interface (Excel 97, Excel 2000, Excel 2002, or Excel 2003)? This site is for you! If you use a later version of Excel, visit our ExcelTips site focusing on the ribbon interface.