Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Substring/Find last occurence of "/" and output everything to the right of it

I would like to apply some type of formula that will find the last occurence of a forward slash character (/) and then output everything to the Right of it. Below is an example:

/shared/Custom/Conversion_Reports/Supplier Address/Supplier Address Rejection.xdo

In this example the last slash is the 5th one above (going from left to right), so I would want to output everything to the Right of it, which would be:
Supplier Address Rejection.xdo

The folder names are all variable in length and the number of folders (slashes) also varies, so thats why I need to use some type of Find function, but I do not know how to find the last occurence of a specific character. Thanks in advance.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Use TEXTAFTER() Function:

=TEXTAFTER(B2,"/",-1)

Or,

enter image description here


• Formula used in cell B5

=TRIM(RIGHT(SUBSTITUTE(B2,"/",REPT(" ",100)),100))

Or, Formula used in cell B6

=FILTERXML("<m><b>"&SUBSTITUTE(B2,"/","</b><b>")&"</b></m>","//b[last()]")

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading