how can i extract only number from a cell containing both number and text.
sr 521
sr 25
sr 5
I would like to get
521
25
5
Thanks.
how can i extract only number from a cell containing both number and text.
sr 521
sr 25
sr 5
I would like to get
521
25
5
Thanks.
Hi South, welcome to the forum.
Assuming your numbers are in A1:A10, in B1 use:
=LOOKUP(99^99,--("0"&MID(A1,MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},A1&"0123456789")),ROW($1:$10000))))
Fill down to B10. Hope that helps!
Thanks Paul.
But the formula seems to be not working. Perhaps I was not clear with my question. Here is it again.
sr 521 521
sr 25 25
sr 5 5
In cells A1 to A3, I have characters listed in the left side. In other cells, I would like to get only numbers without sr.
Thanks.
Maybe try...
=MID(A1,FIND(" ",A1)+1,LEN(A1))
HTH
Regards, Jeff
Thank you HTH. Your formula worked well.
You're welcome and glad it worked for you
Please do not forget to mark the thread as solved if this satisfies your query.
The formula I provided works just fine.
If cell A1 has "sr 521" and you put my formula into B1, B1 will show: 521
Same for your other examples. If your data ALWAYS has the text "sr " in front of the number, then a simple MID function like the one jeffrey provided will suffice. Jeffrey's formula works by finding the first space character and returning everything to the right of it. If your text in A1 were "sr bob cat 292", that formula would return "bob cat 292" while mine would still return just 292.
Note also that the MID formula will return a text (string) result, while mine will return a numeric value. It may or may not make a difference depending on what you're doing with that information.
My understanding of the question was that those were two different cells.
"sr 521" in one cell, and the user wanted just the 521 in the cell next to it. Even in the re-phrase after my original post, that's how it appeared to me. Unfortunately the forum doesn't apply spacing to columns well (at all) unless you use the CODE tags. Only the user knows best.
Yes I see...could be...
and BTW
I used your formula and it worked fine as of course you already know
I bow to others that came up with it and have applied it before me.
Gr8 Paul...your formulae worked for me....thanks a lot
regards
misys
paul can u explain me the formulae please...thanks in advance
Step through it using Evaluate Formula in the ribbon.
I'd suggest testing on a short alphanumeric string (let's say 10 characters) in A1, and change ROW($1:$10000) to ROW($1:$10), so you can see how it's calculating.
thanks paul,
how can i we match multiple columns data AS SHOWN in attachment, here we have multiple columns of 15 with 2000 rows.
how can we do this with a formulae to match all columns with first column.
please help me out
@misys.til
don't break in with your own question in anotherone's topic.
it is against the forumrules.
in that case you have to make a new question and refer to this one.
Notice my main language is not English.
I appreciate it, if you reply on my solution.
If you are satisfied with the solution, please mark the question solved.
You can add reputation by clicking on the star * add reputation.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks