How to create Microsoft Excel data validation custom messages, to help people enter worksheet data correctly. Show special error messages to help people fix invalid entries without frustration Show
Author: Debra Dalgleish Data Validation MessagesWith the options available in data validation, you can display messages to give instructions to the people who use your spreadsheet. There are two types of data validation messages:
Video: Create an Input or Error MessageTo see the steps for creating an input message and an error message, watch this short video tutorial. The written instructions are below the video. Create an Input MessageTo help people know what data should be entered in a cell, you can set up an Input Message that is displayed when the cell is selected. Follow these steps to show a short message when a cell is selected.
Input Message SizeAlthough there are 255 characters allowed in the Input Message box, the box has a maximum height and width, and all the characters might not fit. NOTE: The size of the message box cannot be changed -- it is automatically set by Excel. For example, in the message box below, there are 254 "i" characters, with an "X" at the end. However, in the message box below, there are 254 "W" characters, with an "X" at the end. Only 126 of the characters appear in full, and the remaining characters are cut off, or not visible. Input Message PositionIn most cases, the input message pops below the cell, with the left edge of the message at the middle point of the cell's width. If the cell is close to the right side of the Excel window, the right border of the input message will start at the Excel window border. If there is not enough room below the cell, the input message appears at the right side of the cell, if there is enough room there. If there is not enough room below the cell, or to the right, the input message appears at the left side of the cell. If there is a comment in the cell, the input message appears below the cell, with the right edge of the message at the middle point of the cell's width. This can cause problems in column A, where there is no room at the left, and the data validation message is cut off. Move an Input MessageWhen an input message appears, you can temporarily drag it to a different location on the worksheet.
Choose Error Alert StyleIf the setting, Show error alert after invalid data is entered, is turned on, there are three error alert styles that you can use. To choose a style, follow these steps:
Error Alert Style FeaturesHere are the features and behaviours for the 3 types of Error Alert styles Stop - Prevents the entry of invalid data
Warning: Discourages the entry of invalid data.
Information: Announces the entry of invalid data.
Create Custom Error MessageThe default data validation error message does not explain why the data is invalid, or how to fix the problem. To help people who might use the data validation cells, create a custom error message, with details on the data validation rule that are applied to the cell. Create a Custom Error MessageTo create a custom error message, follow these steps:
Turn Error Alert OffYou can turn Error Alert off, to allow people to enter invalid data. For example, if the data validation cell contains a dropdown list, turn off the Error Alert to allow users to type items that are not in the list. To turn off Error Alert:
Error Checking in TablesIf data validation cells are in a named Excel table, invalid data might be flagged by Excel's Error Checking Rules, even if you have followed the instructions above, to turn off Error Alert messages. In the screen shot below, error alerts have been turned off, to allow multiple selections from a drop down list. However, there is a Error Checking alert, for a data validation error, because the cell is in a table. You can manually respond to each message, and select Ignore Error. Or, you could turn off all the data checking for tables, by following the steps below. Please note that:
To change the setting:
Get the Sample FileGet a zipped Excel file with the data validation message examples. The Excel workbook is in xlsx format, and does not contain any macros Related PagesData Validation Basics Dependent Drop Down Lists Data Validation Tips |