View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
r[_4_] r[_4_] is offline
external usenet poster
 
Posts: 7
Default R: Alternate ways to extract a substring?

Hi Robert

Function Mid2( _
sString As String, _
lStart As Long, _
Optional lLength As Long) As String

Mid2 = Right(sString, Len(sString) + 1 - lStart)
If lLength Len(Mid2) Then
Mid2 = Left(Mid2, lLength)
End If
End Function


regards
r