View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Coderre
 
Posts: n/a
Default aLPHAnUMERIC validation

I believe this works:
To test cell A1, try this formula:
B1:
=ISNUMBER(SUMPRODUCT(SEARCH(MID(A1,ROW(INDIRECT("1 :"&LEN(A1))),1),"abcdefghijklmnopqrstuvwxyz0123456 789")))

That formula is not case-sensitive and returns TRUE if the cell only
contains letters and/or numbers. It returns FALSE if blank or if it contains
special characters.

Does that help?

***********
Regards,
Ron


" wrote:

Yeah I want only letters and numbers in my cell.

ISTEXT returns true even if the cell contains something like w! where !
is not an alphabet.
Further the cell might contain both number and alphabet, like "nf45m".
In that case
none of above would work.

Thanks
Pras.