We can allow to enter only text of certain number of characters in the Excel cells by using the Text Length Validation.
Below are the steps to apply data validation for Text Length:
- Select the range.
- Go to Data tab>>Data Validation>>Click on Data Validation.
- Below given window will be opened.
- Select Text length in Allow drop down.
- Select between in Data drop down and put Minimum (Number of characters) and Maximum (Number of characters).
- Click on OK button.
As we have given the Minimum as 2 and Maximum as 5 in the criteria. So, a text 2 to 5 characters long will be allowed to enter. if the text with any other length will be entered, it will show “The value you entered is not valid”
In Data Drop down below given items are available:
- between: is used to allow to enter text which have length between given Minimum and Maximum criteria.
- not between: is used to not allow to enter text which have length between given Minimum and Maximum criteria.
- equal to: is used to allow the text which has the text length as given in criteria.
- not equal to: is used to not allow the text which has the text length as given in criteria.
- greater than: is used to allow all the text which have length greater than the number which has been given in criteria.
- less than: is used to allow all the text which have length less than the number which has been given in criteria.
- greater than or equal to: is used to allow all the text which have length greater than or equal to the number which has been given in criteria.
- less than or equal to: is used to allow all the text which have length less than or equal to the number which has been given in criteria.
Visit our YouTube channel to learn step-by-step video tutorials