View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default Alphanumeric limitation

"Ron Rosenfeld" wrote in message
...
On Fri, 25 Apr 2008 08:52:00 -0700, Dan wrote:

Looking for help to validate a single cell to an alphanumeric entry that
is
exacly 6 characters in length with the first character required to be a
letter and the remaining characters to be numbers. Exp: A00142 orT10001,
ect.


=AND(LEN(A1)=6,CODE(A1)=65,CODE(A1)<=90,ISNUMBER(-MID(A1,{2,3,4,5,6},1)))

if the first letter must be capitalized.

If it can be upper or lower case, then:

=AND(LEN(A1)=6,OR(AND(CODE(A1)=65,CODE(A1)<=90),A ND(CODE(A1)=97,CODE(A1)<=122)),
ISNUMBER(-MID(A1,{2,3,4,5,6},1)))
--ron


If the OP's intention is to use this as a DataValidation rule (which is my
interpretation) you can't use formulas with array constants.

--
Biff
Microsoft Excel MVP