Help center
How to format phone numbers to E.164 in Excel
Turn messy phone numbers into E.164 in Excel with plain formulas: strip punctuation, add the country code, drop the trunk zero, and flag rows that need a check.
Updated 2026-11-23
In Excel, strip the punctuation with nested SUBSTITUTE in one column, then build the E.164 number in a second column by adding the country code and, where needed, dropping the leading zero. Keep one country per column and flag what does not fit. A formula checks the shape of a number, not whether it exists.
E.164 is a +, the country calling code and the national number, with no spaces or punctuation. See E.164 format explained for why to store that form.
Steps in Excel
Put the raw numbers in column A, starting at row 2. Format column A as Text before pasting, so Excel keeps leading zeros.
- Get the digits. In
B2, strip the punctuation:
=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A2," ",""),"-",""),"(",""),")",""),".",""),"+","")
It removes spaces, hyphens, parentheses, dots and plus signs, and leaves only digits.
- US and Canada (
+1). InC2:
=IF(LEFT(TRIM(A2),1)="+","+"&B2,IF(LEN(B2)=10,"+1"&B2,IF(AND(LEN(B2)=11,LEFT(B2,1)="1"),"+"&B2,"CHECK")))
It keeps numbers that already start with +, adds +1 to 10 digits, accepts 11 digits that begin with 1, and writes CHECK for the rest.
- A country with a leading zero. For United Kingdom numbers written like
07400 123456:
=IF(LEFT(TRIM(A2),1)="+","+"&B2,IF(LEFT(B2,1)="0","+44"&MID(B2,2,20),"CHECK"))
MID(B2,2,20) drops the first character, the domestic trunk prefix. Replace +44 with the code of your country, such as +33 for France.
- Fill down. Double-click the fill handle of
C2. - Catch odd lengths. E.164 allows at most 15 digits. In
D2:
=IF(C2="CHECK","check",IF(AND(LEN(C2)>=9,LEN(C2)<=16),"ok","check"))
The + adds one character, so 16 is the limit. Filter column D for check and fix those rows by hand.
6. Keep the result. Copy column C and use Paste Special, Values, into a new column before deleting helper columns. Format that column as Text.
Worked example
Take four raw values in column A: (201) 555-0123, 201.555.0123, 1-201-555-0123 and 555-0123. Column B holds 2015550123, 2015550123, 12015550123 and 5550123. With the US formula, column C reads +12015550123 for the first three, and CHECK for the last, because seven digits carry no area code. The first two rows are the same number written differently, so a duplicate filter on column C now finds them. That is the main payoff of E.164: one number, one string.
Sort or filter column C to remove duplicates with Data, Remove Duplicates. Do it on the E.164 column, never on the raw one, or (201) 555-0123 and 201.555.0123 survive as two contacts.
Check validity with the API
Formulas test shape. To test whether each number can exist and what type it is, send it to the phone endpoint with the country:
curl https://api.qelka.com/v1/phone \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"phone": "07400 123456", "country": "GB"}'
Read status (valid, invalid or unknown), e164 and line_type. For a whole sheet, save it as CSV and use bulk jobs: the result file adds result_e164, result_status and result_line_type next to your columns. A basic check costs 1 credit per number. See Clean a phone number list.
Common mistakes
- Pasting numbers into a General column. Excel drops leading zeros before your formula sees them. Format as Text first.
- Mixing countries in one column. A formula cannot tell
0612345678in France from the same digits elsewhere. Split by country. - Keeping the zero after the code.
+4407400123456is wrong. Drop the trunk zero. - Treating
okas valid. It means the length fits. - Scientific notation. Long numeric cells turn into
7.4E+11. Store them as text.
Related
Frequently asked questions
How do I add a country code to phone numbers in Excel?
="+1"&B2 for a 10-digit US number. For countries that write a leading zero for domestic calls, drop it first with MID(B2,2,20), so 07400123456 becomes +447400123456. Do one country per column, because a formula cannot guess the country.Why does Excel remove the leading zero or the plus sign?
Can a formula tell me if a number is valid?
Put this check in your product
Get an API key in under a minute. 100 free credits every month, no card required.
- 100 free credits a month
- No card
- Test keys spend nothing
- Cancel any time