Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi All,
e.g. In cell A1 there is a string = "dummy1\dummy3\cat\test" In cell B1 I want result = "test" In pseudo code: test = functionX("dummy1\dummy3\cat\test"; "\" ) I don't want write visual basic code just use normal excel functions. Is it possible to write this kind of function? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Use INSTRREV
string = "dummy1\dummy3\cat\test" string = mid(string,instrrev(string,"\") + 1) The instrrev will find the position of the last back slash in the string. You add one to get everything after the last back slash. -- joel ------------------------------------------------------------------------ joel's Profile: http://www.thecodecage.com/forumz/member.php?userid=229 View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=158814 Microsoft Office Help |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Wed, 2 Dec 2009 05:20:37 -0800 (PST), Wille wrote:
Hi All, e.g. In cell A1 there is a string = "dummy1\dummy3\cat\test" In cell B1 I want result = "test" In pseudo code: test = functionX("dummy1\dummy3\cat\test"; "\" ) I don't want write visual basic code just use normal excel functions. Is it possible to write this kind of function? =TRIM(RIGHT(SUBSTITUTE(A1,"\",REPT(" ",99)),99)) --ron |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On 2 joulu, 15:45, Ron Rosenfeld wrote:
On Wed, 2 Dec 2009 05:20:37 -0800 (PST), Wille wrote: Hi All, e.g. In cell A1 there is a string = "dummy1\dummy3\cat\test" In cell B1 I want result = "test" In pseudo code: test = functionX("dummy1\dummy3\cat\test"; "\" ) I don't want write visual basic code just use normal excel functions. Is it possible to write this kind of function? =TRIM(RIGHT(SUBSTITUTE(A1,"\",REPT(" ",99)),99)) Thank you very much. This solved problem. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Get characters on left of specified character in Excel | Excel Discussion (Misc queries) | |||
how to select the first character in a cell and delete the rest | Excel Worksheet Functions | |||
Extract numeric characters plus one character... | Excel Worksheet Functions | |||
Counting # of characters before a certain character | Excel Discussion (Misc queries) | |||
Remove all characters following the first character in a string | Excel Discussion (Misc queries) |