Thread: Is Alaphabetic
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Anita[_6_] Anita[_6_] is offline
external usenet poster
 
Posts: 6
Default Is Alaphabetic

I believe this does what you're asking for:

Function IsAlpha(entry) As String
Dim i As Integer
Dim c As Variant
Dim OK As Boolean
i = 1
For i = 1 To Len(entry)
c = Mid(entry, i, 1)
If (UCase(c) Like "[A-Z]") Then
OK = True
Else
OK = False
End If
If OK = False Then
IsAlpha = False
Exit Function
End If
Next i
IsAlpha = True
End Function

Regards,
Anita