View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default find letter vrs number

No, it was a typo, thanks for pointing it out:

Function retText(var)
retText = ""
If VarType(var) = 8 Then
If Not IsNumeric(Left(var, 1)) Then
retText = Left(var, IIf(InStr(1, var, " ") = 0, _
Len(var), InStr(1, var, " ")))
End If
End If
End Function



--
Regards,
Tom Ogilvy



Harlan Grove wrote in message
...
"Tom Ogilvy" wrote...
...
Function retText(var)
retText = ""
If VarType(retText) = 8 Then

...

If you've just set retText to "", it's guaranteed to be a string, isn't

it?
If so, isn't the following If test superfluous?