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

Extract everything after 2nd last / in a string in microsoft excel

I have a bunch of URLs with different lengths and folder paths. I wish to extract everything after the 2nd last / in them.

The example URLs:

https://www.example.com/folder1/folder2/folder3/path-name-here/12345678/
https://www.example.com/folder1/folder2/path-name-here/39089/

The output should be:

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

12345678
39089

I have tried a bunch of different functions but no luck so far so would appreciate if someone can support.

>Solution :

Another alternative:

=TEXTBEFORE(TEXTAFTER(A1,"/",-2),"/")

enter image description here

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