Reputation: 23
In Excel,using data validation I want to restrict one cell like below
1-Minimum length should be 3 and Maximum length should be 7
and
2-Restrict user that he/she cannot enter some characters say " : and ? "
Kindly provide the formula.
Thanks
Upvotes: 0
Views: 447
Reputation: 1338
you can use this formula:
=AND(LEN(D5)>2,LEN(D5)<8,NOT(ISNUMBER(SEARCH(":",D5))))
For other characters you have to add extra NOT(ISNUMBER(SEARCH(
-instances.
Upvotes: 0