Returns a numbers from a string

I have a string "115 CS 575840" that I need to return the 6 numbers that are together. So, from this string I need to return 575840.
dgravittAsked:
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.

duncanb7Commented:
Is it what your want ?

MID(yourtext,LEN(yourtext)-5,6)

Duncan
0
MontoyaProcess Improvement MgrCommented:
if your last numbers are always six digits you can try this:

=NUMBERVALUE(RIGHT(B3,6))

this takes the text in column B3 and takes the 6 digits from the end, and converts them to a number value
0
Rey Obrero (Capricorn1)Commented:
this should do it

trim(mid(yourString,instrrev(yourString," ")))
0

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
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

dgravittAuthor Commented:
The 6 numbers could be at the end, beginning or middle. I need to pull out the 6 no matter where they are.
0
dgravittAuthor Commented:
Rey, yours works well except the case where there are only 6 numbers in the field. Then it returns an error.
0
dgravittAuthor Commented:
CS is not always part of it
0
duncanb7Commented:
If always next to "CS"
=MID(A1,FIND("CS",A1)+3,6)

Duncan
0
dgravittAuthor Commented:
I found a work around to handle the records where it just contained 6 numbers, and Rey, your solution handled the rest.
0
Rey Obrero (Capricorn1)Commented:
dgravitt,
cool, but next time, it will be helpful if all scenario about the data is available.
0
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 Access

From novice to tech pro — start learning today.

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.