Ms Excel: retrieve last numeric string after "\"char

Hello experts,

I have the following string C:\toto\titi\tt\3252.

I am looking for a formula in order to retrieve numeric value such as 3252. The complex thinks is that last numeric value doesn't always contains 4 number it can contains 5 or 6. The unique think which is always common is that the next  left value of numeric string to retrieve is \ char.

Thank you very much for your help.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

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.

Roy CoxGroup Finance ManagerCommented:
assuning string in A!, try

Martin LissOlder than dirtCommented:
I don't want any credit but Roy probably meant this.

Roy CoxGroup Finance ManagerCommented:
Just trying to change it but you beat me Martin, I also meant "assuming" ( clumsy fingers!!!)
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

LD16Author Commented:
Tested but it doesn't work
Instead of having:

Martin LissOlder than dirtCommented:
I found this on the web.


I don't begin to understand it, but it does work.

Experts Exchange Solution brought to you by

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
LD16Author Commented:
Thank you Martin. I tested and it works.
Thank you very much for your help.
Martin LissOlder than dirtCommented:
You’re welcome and I’m glad I was able to help.

If you expand the “Full Biography” section of my profile you’ll find links to some articles I’ve written that may interest you.

Marty - Microsoft MVP 2009 to 2017
              Experts Exchange Most Valuable Expert (MVE) 2015, 2017
              Experts Exchange Top Expert Visual Basic Classic 2012 to 2017
Rob HensonFinance AnalystCommented:
To explain the functions that Martin used:

The SUBSTITUTE function will look for specified characters and replace them with another specified character(s).

LEN function returns the number of characters in the string

REPT function repeats a character the specified number of times.

RIGHT function returns specified number of characters from the right hand end of the string.

TRIM function removes leading or trailing spaces and multiple central spaces get converted to a single space.

In this instance all of the occurrences of  \ are being replaced with a \ and repeated spaces, the space being repeated as many times as the ORIGINAL length of the string.

The RIGHT function is then looking at the right hand end of the amended string and returning the length of the original string; this will be the last characters and however many spaces it needs to be equivalent to the original length. The TRIM function then removes the surplus spaces.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.