totn Excel 2007 Basics

MS Excel 2007: Set up a cell to allow a specific number of characters

This Excel tutorial explains how to set up data validation to only allow an exact length characters to be entered in the cell in Excel 2007 (with screenshots and step-by-step instructions).

Question: In Microsoft Excel 2007, I want to set up a cell to only allow (EXACTLY) 10 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 A4 to A7.

Select the Data tab in the toolbar at the top of the screen. Then in the Data Tools group, click on the Data Validation drop-down and select Data Validation.

Microsoft Excel

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

Next, click on the Error Alert tab.

Microsoft Excel

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

Microsoft Excel

Now if a value is entered in one of those cells that is NOT equal to 10 characters, the following error message will appear:

Microsoft Excel