Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I want to truncate the portion of a string that follows my third "\".
So data looks like, C:\TEMP\RESULTS\FINANCE\3q\Findings and I want just C:\TEMP\RESULTS\FINANCE\ |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Your example does not match your request, but anyway:
s = "C:\TEMP\RESULTS\FINANCE\3q\Findings" t = "\" U = Split(s, t) s = U(0) & t & U(1) & t & U(2) & t -- Gary's Student "bwmaher" wrote: I want to truncate the portion of a string that follows my third "\". So data looks like, C:\TEMP\RESULTS\FINANCE\3q\Findings and I want just C:\TEMP\RESULTS\FINANCE\ |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
here's a formula that should work if the string is in A1
=LEFT(A1,FIND(CHAR(7),SUBSTITUTE(A1,"\",CHAR(7),3) )) -- Gary "bwmaher" wrote in message ... I want to truncate the portion of a string that follows my third "\". So data looks like, C:\TEMP\RESULTS\FINANCE\3q\Findings and I want just C:\TEMP\RESULTS\FINANCE\ |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you, Gary. it worked perfectly.
"Gary Keramidas" wrote: here's a formula that should work if the string is in A1 =LEFT(A1,FIND(CHAR(7),SUBSTITUTE(A1,"\",CHAR(7),3) )) -- Gary "bwmaher" wrote in message ... I want to truncate the portion of a string that follows my third "\". So data looks like, C:\TEMP\RESULTS\FINANCE\3q\Findings and I want just C:\TEMP\RESULTS\FINANCE\ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I truncate something like this? | Excel Discussion (Misc queries) | |||
TRUNCATE SPACE FROM NUMERICAL STRING eg "33Â 033Â 546" | Excel Worksheet Functions | |||
Truncate/Mod | Excel Programming | |||
How do you truncate a text string? | Excel Worksheet Functions | |||
Truncate | Excel Programming |