Taking just numbers from a cell

Welsh Mark

Board Regular
Joined
Aug 7, 2009
Messages
84
Hi Guys,

Is there a formula or function that would allow me to take the first eleven numbers from a cell?

I have a spreadsheet with a colunm of telephone numbers, I only want the first 11 numbers (which make up a UK telephone no). There are quite a few different ways the telephone numbers appear in files.

02920886500 ext 459
020 87541925 - Mr Jones
07817799232 M 029 20886500
(029) 20885612
01200 443311 (ACCTS)
0161-796-7337 (07860) 328311
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
Hi

In the examples you posted you just have to get rid of "(", ")", "-" and spaces.

Try:

=LEFT(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A1,"(",""),")","")," ",""),"-",""),11)

If it's not enough please post a rigorous specification.
 
Upvote 0

Forum statistics

Threads
1,214,397
Messages
6,119,273
Members
448,883
Latest member
fyfe54

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