Trim from end by delimiter ">"

JosephGourvenec

New Member
Joined
Oct 23, 2015
Messages
12
Hi All,

I need some help to acheive triming from the end by the first ">" delimiter from the end in a structure for example:



Root > Technology > Photography > Lenses
Root > Gifts > Flowers
Root > Sports > Clubs > Running
Root > Insurance > Car


What I would like to acheive is having a formula that simply takes the last characters off e.g. " > Lenses " so the final result is just "Root > Technology > Photography"

Example with formula from above:


Root > Technology > Photography
Root > Gifts
Root > Sports > Clubs
Root > Insurance



Thanks in advance everyone fro being #awesome
 
Last edited:

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
I've not had time to check all but I will do for sure.

But thank you too
It would be safer to use one of the earlier methods that actually locates that last ">"


peterSSs posted in a similar thread question
I'd say that must have been quite a long time ago. Note that because of this particular data structure, that formula leaves an extra space on the end of the result which I doubt is desirable. So for this I would now use

=TRIM(LEFT(A1,FIND("|",SUBSTITUTE(A1,">","|",LEN(A1)-LEN(SUBSTITUTE(A1,">",""))))-1))
 
Upvote 0

Forum statistics

Threads
1,223,243
Messages
6,170,971
Members
452,371
Latest member
Frana

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top