Subscribe to our YouTube Channel for more Videos

How to limit the number of characters in a cell in Excel?


There are times when you might want to prevent the users from entering certain number of characters in a cell in Excel. For example , you might have a mobile number column and you want to limit the cell input to less then or equal to 10 characters.

How to limit the number of characters in a cell in Excel?

1. Select a range of cell where you want to apply the validation and then navigate to the “Data” tab and then select “Data Validation” dropdown list in the Data tools and then click “Data Validation”.

image

2. In the Data Validation Dialog , select “Text Length” from the “Allow” dropdown list. In the “Data” combo box , select “less than or equal to” as option. In the Maximum textbox , enter the value 10 and then Click “OK” button.

image

3. When you start entering more than 10 letters in the selected range of cells , you will be prompted with a message “This value doesn’t match the data validation restrictions defined for this cell”.

image

Senthil Kumar B
Senthil Kumar is a former Microsoft MVP (Most Valuable Professional). He is a Co-Author of the book "Windows 10 Development Recipes using JavaScript and CSS" for Apress Publication. He is a technical presenter, blogger, mentor and a Geek.  Senthil is a regular speaker is various local user groups. He has presented at conferences like Great Indian Developer Summit (GIDS) & Microsoft DevCamps. You can reach out to him via his Twitter handle @isenthil.