R: Alternate ways to extract a substring?

R

r

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top