View Single Post
  #4   Report Post  
Dave Peterson
 
Posts: n/a
Default

Something like:

Option Explicit
Function IsAllText(str As String) As Boolean
Dim iCtr As Long
IsAllText = True
For iCtr = 1 To Len(str)
If UCase(Mid(str, iCtr, 1)) Like "[A-Z]" Then
'ok
Else
IsAllText = False
Exit For
End If
Next iCtr
End Function



thephoenix12 wrote:

Hi,

I know that IsNumeric returns true if the selection is only numbers,
but is there a function that returns true if the selection is all text?
Using If Not IsNumeric does not work, because if something contains text
and numbers it returns true, which is what I do not want.

Thanks,

Steve

--
thephoenix12
------------------------------------------------------------------------
thephoenix12's Profile: http://www.excelforum.com/member.php...o&userid=24336
View this thread: http://www.excelforum.com/showthread...hreadid=381736


--

Dave Peterson