ashutosh maheshwari
ashutosh maheshwari

Reputation: 23

Data Validation: Text length + restrict some CHARACTERS in Excel

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

Answers (1)

OverflowStacker
OverflowStacker

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

Related Questions