Extract text and numbers from Cell

asalman07

Active Member
Joined
Jun 12, 2013
Messages
325
Thank you in advance for your help.

I have in column B going down to row 10,000 numbers followed by text.

So, a cell could be like this 005067 Mr.John or like this 3056532987 Tim

The numbers can be different digit lenghts. But one thing for sure is that the text always follows the numbers.

I am trying to extract all the numbers. Is this possible?

Thanks
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Is it fair to say that you want the numbers up to the first space?

Try
=LEFT(A1,FIND(" ",A1))+0
 
Upvote 0
Got it, worked great. I actually thought of that answer later and came up with a formula like

=LEFT(B42,SEARCH(" ",B42,1)) but will use yours as it transforms to numbers from text.

Thanks!!

Thanks
Is it fair to say that you want the numbers up to the first space?

Try
=LEFT(A1,FIND(" ",A1))+0
 
Upvote 0
You're welcome...

Yours would be fine as well, just add the +0 at the end.


FYI, the only difference I'm aware of between Find and Search is that FIND is case sensitive.
But that's irrelevant here since the text you're looking for is a space.
 
Upvote 0
FYI, the only difference I'm aware of between Find and Search is that FIND is case sensitive.

It's also quite interesting that, with A1 empty (or containing the null string ""):

=FIND("",A1)

returns 1, whereas:

=SEARCH("",A1)

returns #VALUE!

Regards
 
Upvote 0
That is interesting...and wierd because if anything, you'd think it would be the other way around since FIND is the more sensitive one...
 
Upvote 0
And what is that?
(Bulls***t)

<table border='1' cellspacing='0' cellpadding='2' valign='middle' colspan='4' style='font-family:Arial; color:#000000; background-color:#FFFFFF; font-size:10px; font-weight:normal; font-style:normal; '><colgroup><col width='28pt'><col width='60pt'><col width='33pt'><col width='28,5pt'></colgroup><tr style='background-color:#cacaca'><td> </td><td align='middle'>A</td><td align='middle'>B</td><td align='middle'>C</td></tr><tr><td style='background-color:#cacaca' align='middle'>1</td><td align='left' >8 8</td><td align='right' >2</td><td align='right' >2</td></tr><tr><td style='background-color:#cacaca' align='middle'>2</td><td align='left' >88 8</td><td align='right' >3</td><td align='right' >3</td></tr><tr><td style='background-color:#cacaca' align='middle'>3</td><td align='left' >888 88</td><td align='right' >4</td><td align='right' >4</td></tr><tr><td style='background-color:#cacaca' align='middle'>4</td><td align='left' >88 888</td><td align='right' >3</td><td align='right' >3</td></tr></table><br><table border='3' cellspacing='0' cellpadding='2' valign='middle' colspan='2' style='table-layout:auto; color:#000000; background-color:#FFFFFF; font-family:Arial; font-size:10px;'><colgroup><col width='40pt'><col></colgroup><tr style='background-color:#eeaaaa'><td>Cell</td><td>Formula</td></tr><tr><td>B1</td><td><Span style='color:#222222'>=FIND</Span><Span style='color:#0000DD'>(" ",A1)</Span><Span style='color:#222222'></Span></td></tr><tr><td>C1</td><td><Span style='color:#222222'>=SEARCH</Span><Span style='color:#0000DD'>(" ",A1)</Span><Span style='color:#222222'></Span></td></tr></table>
 
Upvote 0
And what is that?
(Bulls***t)

ABC
18 822
288 833
3888 8844
488 88833

<colgroup><col style="width: 28ptpx"><col width="60pt"><col width="33pt"><col width="28,5pt"></colgroup><tbody>
</tbody>

CellFormula
B1=FIND(" ",A1)
C1=SEARCH(" ",A1)

<colgroup><col style="width: 40ptpx"><col></colgroup><tbody>
</tbody>

Sorry - not sure I understand?

Regards
 
Upvote 0

Forum statistics

Threads
1,214,920
Messages
6,122,279
Members
449,075
Latest member
staticfluids

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top