Excel - Extract data between the 3rd "\" and "."

Hello everyone,

I have a massive spreadsheet with a field that gives the file path. But now I am trying to find a way to just have the file name and get rid of everything to the left of the last "\". The hard part is that the amount of "\" in each row vary. Can anyone help me out?

Here is an example of a field:

...\Hydraulic Fittings\37 degree flare tube fittings\JIC cap nut_0304.tif (All I want is in bold).
...\Dixon Speciality Hose\PTFE convoluted non-conductive hose.tif

Like I said earlier, some of the rows vary in the amount of "\"'s they have.

Any response is appreciated.

Thanks.

P.S. I tried a between formula but the it reads the first "\".
TimSr. System AdminAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

 
zorvek (Kevin Jones)ConsultantCommented:
Use this formula:

=RIGHT(A1,LEN(A1)-FIND("|",SUBSTITUTE(A1,"\","|",LEN(A1)-LEN(SUBSTITUTE(A1,"\","")))))

Kevin
0

Experts Exchange Solution brought to you by ConnectWise

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
 
TimSr. System AdminAuthor Commented:
WOW!  Thanks I am beyond grateful! If you don't mind, could you break it down to me?
0
 
zorvek (Kevin Jones)ConsultantCommented:
Starting with "...\xxx\yyy.tif"

=RIGHT(A1,LEN(A1)-FIND("|",SUBSTITUTE(A1,"\","|",LEN(A1)-LEN(SUBSTITUTE(A1,"\","")))))

This part:

LEN(A1)-LEN(SUBSTITUTE(A1,"\","")

determines the number of delimiters in the string. There are two in the case so:

=RIGHT(A1,LEN(A1)-FIND("|",SUBSTITUTE(A1,"\","|",2))))

This part changes the last (second) delimiter to a pipe:

SUBSTITUTE(A1,"\","|",2)

So:

=RIGHT(A1,LEN(A1)-FIND("|","...\xxx|yyy.tif")))

This part finds the position of the pipe (or what was the last delimiter):

FIND("|","...\xxx|yyy.tif")

So:

=RIGHT(A1,LEN(A1)-8))

And the final step is to take the rightmost characters where the number of characters is the total length less the position of the pipe or what was the last delimiter.

Kevin
0
 
TimSr. System AdminAuthor Commented:
Thanks!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.