
Originally Posted by
NITIN SHETTY
Hello,
I need a formula to check whether all the letters in a cell are text for Ex "ABDJKJKD"
It should result true if all the letters are text and false if there is any special character or number for Ex "ABDJ7JKD
Please help
This is easy to do with a UDF (user defined function) if a VBA solution is acceptable to you.
Code:
Function IsLetters(S As String) As Boolean
IsLetters = Not S Like "*[!A-Za-z]*"
End Function
HOW TO INSTALL UDFs
------------------------------------
If you are new to UDFs, they are easy to install and use. To install it, simply press ALT+F11 to go into the VB editor and, once there, click Insert/Module on its menu bar, then copy/paste the above code into the code window that just opened up. That's it.... you are done. You can now use IsLetters just like it was a built-in Excel function. For example,
=IsLetters(A1)
Bookmarks