Thread: Cell validation
View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
vezerid vezerid is offline
external usenet poster
 
Posts: 751
Default Cell validation

The following formula will accept only capital letters of the alphabet
in positions 1-5, only a number in positions 6-9 and only a capital
letter in position 10. It is an array formula, hence commit with Shift
+Ctrl+Enter

=PRODUCT((CODE(MID(A2,ROW(INDIRECT("1:5")),
1))64)*(CODE(MID(A2,ROW(INDIRECT("1:5")),1))<91)) *ISNUMBER(--
MID(A2,6,3))*(CODE(RIGHT(A2,1))64)*(CODE(RIGHT(A2 ,1))<91)

HTH
Kostis Vezerides

On May 22, 7:57 am, Sai Krishna
wrote:
Hi,

I have a cell where in I need to enter an alphanumeric strictly as under

AAAAI7504G

The rule is : First 5 should be alphabets, next 4 should be numbers and the
last again an alphabet.

The total characters are therefore 10. For the length of the character, we
can use Text length under Data validation. But we need to ensure that rule is
followed.

The above is only an illustration. But the positions of alphabets and
numbers should be as per the rule above.

Now is there any formula that throws up a warning saying that a number has
been entered in place of an alphabet. In other words, the above rule should
not be violated.

regards
krishna