Tip Printed from ExcelTip.com
Restricting the Number of Characters Entered into a Cell
Problem:
Restricting the length of entries in column A to a maximum of 5 characters.
Solution:
Use Data Validation:
1. Select Column A.
2. Data --> Data Validation --> Settings --> Custom
3. Enter the following formula in the Formula box:
=LEN(A2)<6
4. Click OK.
If an entry is longer than 5 characters, an error message will pop up, forcing the user to try again.