Extracting Specifc Text from Excel String (In, Out Values)

Heyas,

I copied some data from report and pasted into the excel the lines look something like this.

[Random Alphanumeric Chars of Varying Lengths] In=323 Out=69540 [Random Alphanumeric Chars of Varying Lengths].

What I am looking to do is extract the 'In' and 'Out' values into to separate columns.

I am using the following formula's but it doesn't work at all, all I am getting is #VALUE and I don't understand why.

=REPLACE(REPLACE(A1,FIND(" ",A1,FIND("In=",A1)),LEN(A1),""),1,FIND("In=",A1)+2,"")
=REPLACE(REPLACE(A1,FIND(" ",A1,FIND("Out=",A1)),LEN(A1),""),1,FIND("Out=",A1)+3,"")

Any ideas?
ZackGeneral IT Goto GuyAsked:
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.

Naresh PatelTraderCommented:
I am getting values as per your formula 323 & 69540.

I don't seem any fault.

thanks
0
Naresh PatelTraderCommented:
just one try - change format to Text & then apply formula for that range.

Thanks
0
MacroShadowCommented:
Are  there are characters after Out=69540?
0
Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

Glenn RayExcel VBA DeveloperCommented:
I tested several random strings with " In-323 Out=69540 " inside them and the formulas work for me.  So long as there is a space before "In" and after the value for Out, it looks like it should work.  

Maybe there are non-printable characters in the source string?  Try a TRIM and/or CLEAN function on it first and see if that resolves the issue.

-Glenn
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
stevejacob68Commented:
Hi,
Try this one with number format, if it is working, then change the text format.
0
Glenn RayExcel VBA DeveloperCommented:
Could you provide a sample file with some of the lines you pasted?  Maybe we can replicate the issue and resolve.

-Glenn
0
ZackGeneral IT Goto GuyAuthor Commented:
Cheers that was it, I had hyperlink into source column and that was causing the error.
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 Excel

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.