Home |
Search |
Today's Posts |
#21
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I was able to duplicate the exception by using a word that wasn't in
the string being truncated. That precludes that you need to know the contents of the string being truncated contains the search string... Function TruncateString$(sText$, sFind$, Optional lStart& = 1) If InStr(sText, sFind) 0 Then 'Truncate TruncateString = Mid$(sText, lStart, InStr(sText, sFind) - lStart) Else 'Return original string TruncateString = sText End If End Function -- Garry Free usenet access at http://www.eternal-september.org Classic VB Users Regroup! comp.lang.basic.visual.misc microsoft.public.vb.general.discussion |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
TRUNCATE SPACE FROM NUMERICAL STRING eg "33Â 033Â 546" | Excel Worksheet Functions | |||
Truncate string | Excel Programming | |||
Truncate string | Excel Programming | |||
How do you truncate a text string? | Excel Worksheet Functions | |||
Any fast method to parse a string into row & col information | Excel Programming |