0
votes

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

1
You cant restrict Cell A with a formula in Cell A - you need vba for that - urdearboy
What formula have you tried under validation yourself? - JvdV

1 Answers

0
votes

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.