Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sorry - perhpas you mean you wanted everything to the left of the last
slash? Sub test() Dim str As String str = "abcde/fghij/klmno/pqrst" str = Left(str, InStrRev(str, "/") - 1) End Sub or the first slash? Sub test() Dim str As String str = "abcde/fghij/klmno/pqrst" str = Left(str, InStr(str, "/") - 1) End Sub -- Rob van Gelder - http://www.vangelder.co.nz/excel "Rob van Gelder" wrote in message news:... I think InStrRev is XL2000 Sub test() Dim str As String str = "abcde/fghij/klmno/pqrst" str = Mid(str, InStrRev(str, "/")) End Sub -- Rob van Gelder - http://www.vangelder.co.nz/excel "JAmes" wrote in message ... Hi Gang How can I truncate text to the right of and including / in a cell. Woul dlike to do it through code Thanks! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I truncate linked text? | Excel Worksheet Functions | |||
truncate text to first word | Excel Discussion (Misc queries) | |||
How do you truncate a text string? | Excel Worksheet Functions | |||
Truncate text | Excel Programming | |||
truncate text using VBA Excel | Excel Programming |