excel vba isalpha code example
Example 1: excel vba isalpha
'VBA function to test if a string contains only letters:
Function IsAlpha(s) As Boolean
IsAlpha = Len(s) And Not s Like "*[!a-zA-Z]*"
End Function
Example 2: excel vba isalpha
'VBA function to test if a string contains only letters:
Function IsAlpha(s) As Boolean
IsAlpha = Len(s) And Not s Like "*[!a-zA-Z]*"
End Function