Home Privacy Policy Feedback Link to us Site Map Forums

Excel: Set up a cell to only allow a certain number of characters in Excel 2003/XP/2000/97


Also learn how to set up a cell to only allow a certain number of characters in Excel 2007.

Question:  In Excel 2003/XP/2000/97, I want to set up a cell to only allow 15 characters. How can I do this?

Answer:  Select the cells that you wish to restrict to a certain number of characters. In this example, we've selected cells A2 to A6.

Under the Data menu, select Validation.


When the Data Validation window appears, set up your criteria. In this example, we've setup the cells to allow a text length of less than or equal to 15.

Next, click on the Error Alert tab.


Enter an Error message to appear when data entered does not conform to the validation rules.


Now if a value is entered in one of those cells that is longer than 15 characters, the following error message will appear: