Suppose, you want to restrict the number of characters that can be entered into an Excel cell. How will you solve this problem?
The answer is Data Validation!
Data Validation in Excel can be used to control the range, type & length of the data that can be entered into a cell.
This blog post is about limiting the length of text in a cell/cells of an Excel worksheet.
Limit Character length to 5
For example, you want to restrict the maximum number of characters allowed in the cells of a data range to 5.
Select the cells in which you want to apply restriction > Go to the Data tab of the Excel ribbon > Data Validation
In the Data Validation dialog, select Text length from the options listed under Validation criteria.
As you can see below, there are 8 rules associated with the option Text length,
To restrict the maximum text length to 5 characters, select the option less than or equal to and type in 5 into the input box under the label Maximum
Click OK and no text of length greater than 5 will be allowed in the selected cells.
For example, when I try to enter the name Christopher which is 11 characters long, Excel will display a warning message.