View Single Post
  #22   Report Post  
Old November 29th 08, 07:02 PM posted to microsoft.public.excel.worksheet.functions
Harlan Grove[_2_] Harlan Grove[_2_] is offline
external usenet poster
 
First recorded activity by ExcelBanter: Mar 2007
Posts: 1,231
Default alpha numeric data validation for excel

"T. Valko" wrote...
....
Ooops!

I can't believe that between us we didn't catch this...

Can't use array constants in a DataValidationCustom rule.


OK, should have causght that.

=AND(ABS(CODE(A1)-77.5)<13,ABS(CODE(MID(A1,2,1))-77.5)<13,
COUNT(1/(MID(A1,3,6)=TEXT(--MID(A1,3,5),"00000"))))

Note that the 6 as 3rd arg in the 1st MID call is intentional. It
eliminates the need for a LEN test.