LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default R: Alternate ways to extract a substring?

sorry, must control the length

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

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

regards
r
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Alternate ways to extract a substring? Robert Crandal[_2_] Excel Programming 1 April 15th 11 11:14 AM
R: Alternate ways to extract a substring? r[_4_] Excel Programming 0 April 15th 11 10:06 AM
The error of my ways. Cerberus Excel Discussion (Misc queries) 5 February 19th 08 09:36 PM
256 ways to make hamburger Nonni Excel Worksheet Functions 2 October 20th 06 11:50 PM


All times are GMT +1. The time now is 05:33 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"