A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Hi, data validation
Restrict data entry to text of a specified length
- Select one or more cells to validate.
- On the Data tab, in the Data Tools group, click
Data Validation.

Issue:
The Data Validation command is unavailable.
An Excel table may be linked to a SharePoint site You cannot add data validation to an Excel table that is linked to a SharePoint site. To add data validation, you must unlink the Excel table or convert the Excel table to a range.
You may be currently entering data The Data Validation command is not available on the Data tab while you are entering data in a cell. To finish entering, press ENTER or ESC.
The worksheet might be protected or shared You cannot change data validation settings if your workbook is shared or protected. To learn how to stop sharing or protecting a workbook, see the links in the See Also section. 3. In the Data Validation dialog box, click the Settings tab. 4. In the Allow box, select Text Length. 5. In the Data box, select the type of restriction that you want. For example, to allow up to a certain number of characters, select less than or equal to. 6. Enter the minimum, maximum, or specific length for the text. You can also enter a formula that returns a number value.
For example, to set the specific length for a full name field (C1) to be the current length of a first name field (A1) and a last name field (B1) plus 10, select
less than or equal to in the Data box and enter =SUM(LEN(A1),LEN(B1),10) in the Maximum box. 7. To specify how you want to handle blank (null) values, select or clear the Ignore blank check box.
**Note** If your allowed values are based on a cell range with a defined name, and there is a blank cell anywhere in the range, setting the
Ignore blank check box allows any values to be entered in the validated cell. This is also true for any cells that are referenced by validation formulas: if any referenced cell is blank, setting the Ignore blank check box allows any values to be entered in the validated cell. 8. Optionally, display an input message when the cell is clicked.
How
to display an input message
- Click the Input Message tab. 2. Make sure the Show input message when cell is selected check box is selected. 3. Fill in the title and text for the message.
- Specify how you want Microsoft Office Excel to respond when invalid data is entered.
How
to specify a response to invalid data
- Click the Error Alert tab, and make sure that the Show error alert after invalid data is entered check box is selected.
2. Select one of the following options for the Stylebox:
- To display an information message that does not prevent entry of invalid data, select
Information.
- To display a warning message that does not prevent entry of invalid data, select
Warning.
- To prevent entry of invalid data, select Stop.
3. Fill in the title and text for the message (up to 225 characters).
**Note** If you don't enter a title or text, the title defaults to "Microsoft Excel" and the message to: "The value you entered is not valid. A user has restricted values that can be entered into this cell." - Test the data validation to make sure that it is working correctly. Try entering both valid and invalid data in the cells to make sure that your settings are working as you intended and your messages are appearing when you expect. Tip If you change the validation settings for a cell, you can automatically apply your changes