d1ch0t0my
d1ch0t0my

Reputation: 443

Excel - Remove All Text Before A Character In Sequence

I have cells that contain text in this format:

Category 1>Category 2>Category 3>Category 4
Category 1>Category 2
Category 1>Category 2>Category 3
Category 1

...and so on. I would like to run a formula that removes all before the last entry in the sequence. So the above would output as:

Category 4
Category 2
Category 3
Category 1

I've tried using this formula but it obviously removes only the text before the first delimiter in the sequence:

=RIGHT(A2,LEN(A2)-FIND(">",A2))

How do I adapt the formula to achieve what I want to do? Cheers.

Upvotes: 3

Views: 5569

Answers (1)

Mrig
Mrig

Reputation: 11702

You may use

=TRIM(RIGHT(SUBSTITUTE(A2,">",REPT(" ",LEN(A2))),LEN(A2)))

Drag/Copy down as required.

enter image description here

Upvotes: 6

Related Questions