Phone Number Formatting

bcmk29

Board Regular
Joined
Oct 20, 2022
Messages
55
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
In my spreadsheet, I have a column (D:D) with phone numbers mentioned. I would like to identify and remove the country code. The data isn't consistent and contains various countries phone number in there hence the format and number of characters would differ for each country by desk phone & mobile phone.
For example
US
(415) 555-5555
+14155555555
Singapore
+65 5555 5555
55555555
China
+852 55555555
55555555

Would appreciate any help on this.
1670916312456.png
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Do you have some independent way of knowing which country a phone number is from, other that looking at the country code?
 
Upvote 0
Do you have some independent way of knowing which country a phone number is from, other that looking at the country code?
Yes, one of the column has Country details in this file its (I:I).

1670918296316.png
 
Upvote 0
How about finding the first blank and extract all the right characters ?
In the below code, A1 is the phone number cell.
Excel Formula:
=MID(A1,FIND(" ",A1)+1,99)
 
Upvote 0
How about finding the first blank and extract all the right characters ?
In the below code, A1 is the phone number cell.
Excel Formula:
=MID(A1,FIND(" ",A1)+1,99)
There are phone numbers with country codes and without blanks ex cell D2 in the screenshot.
 
Upvote 0
Do you have some way of knowing how many digits are in a country's phone number? For example, US phone numbers are always 10 digits. In that case you can use

Excel Formula:
=RIGHT(A1,[variable number of digits corresponding to the country])

after you have cleared away all dashes, spaces and parentheses.
 
Upvote 0
Yes, one of the column has Country details in this file its (I:I).

View attachment 80754
If you have this information all you have to do is copy every country's country code from wiki and paste it into a new sheet, then run a vlookup on this column and get the country code. After that replace all those characters with substitute or something.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,177
Members
453,021
Latest member
Justyna P

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