Need help How to add county code in phone column or how is work i want add +2 so what should i do !

hello Need help How to add county code in phone column or how is work i want add +2 before the phone number like +201020808070

ู„ู‚ุทุฉ ุงู„ุดุงุดุฉ 2022-02-17 131147.png

Solved Solved
0 7 2,936
2 ACCEPTED SOLUTIONS

Hi Hassan,

If you would only have Egyptian phone numbers, so you'll always need to add a "+2" then you can just use the following expression:

"+2" & [phone]

Please note that Egypt's country code is "20" NOT "2", so the prefix to add is "+20" NOT "+2". In Egypt as in many other countries, phone numbers especially mobile begin with 0, so adding "+2" should give an acceptable result most of the time.

However, this is NOT the case in all countries, so the correct way should be to affix the correct country code ("20" in case of Egypt) after removing the left most zero if exists from the phone number. 

Therefore, the correct expression to use should be:

"+20" & IF( 
  STARTSWITH([phone], 0),
  RIGHT([phone], LEN([phone]) -1),
  [phone]
)

If you need to include all country codes for all countries in your app, tell me. In this case, tell me also what is the user's display language of your app. 

View solution in original post

Here's a table of all countries' country codes with country names in English. Add this to your app. 

Country Codes EN - Google Sheets 

The table contains two columns. Use the CC column as key, and Country column as Label. 

In a form you can let the user first choose his country from the list. You should have a reference column in your table pointing to the "Country Codes EN" table. The user will see a dropdown list of all countries and he will choose his country based on name, but underneath, it is the country code that will be selected. 

You can have an initial value set to "20" for this column, so by default Egypt is selected. 

In another field, you let the user enter the phone number, then use the same formula above replacing the fixed "20" by the user's choice. 

[CC] & IF( 
  STARTSWITH([phone], 0),
  RIGHT([phone], LEN([phone]) -1),
  [phone]
)

View solution in original post

7 REPLIES 7

Hi Hassan,

If you would only have Egyptian phone numbers, so you'll always need to add a "+2" then you can just use the following expression:

"+2" & [phone]

Please note that Egypt's country code is "20" NOT "2", so the prefix to add is "+20" NOT "+2". In Egypt as in many other countries, phone numbers especially mobile begin with 0, so adding "+2" should give an acceptable result most of the time.

However, this is NOT the case in all countries, so the correct way should be to affix the correct country code ("20" in case of Egypt) after removing the left most zero if exists from the phone number. 

Therefore, the correct expression to use should be:

"+20" & IF( 
  STARTSWITH([phone], 0),
  RIGHT([phone], LEN([phone]) -1),
  [phone]
)

If you need to include all country codes for all countries in your app, tell me. In this case, tell me also what is the user's display language of your app. 

ูˆุงู„ู„ู‡ ู…ุด ุนุงุฑู ุงู‚ูˆู„ูƒ ุงูŠู‡ ุจุฌุฏ ุดูƒุฑุง ุฌุฏุง

Itโ€™s work now thank you so much for helping always and for understanding me I appreciated your efforts and helping for me ๐Ÿ™

ุญุจูŠุจูŠ ๐Ÿ™‚ ุชุญูŠุง ู…ุตุฑ!

Can you explain how to add country code, area code and phone number? I hate tried it as 

+91 (area code) (phone number) 

But it won't accept it 

@Joseph_Seddik Ok you can tell me how to add all countries code we use English language 

Here's a table of all countries' country codes with country names in English. Add this to your app. 

Country Codes EN - Google Sheets 

The table contains two columns. Use the CC column as key, and Country column as Label. 

In a form you can let the user first choose his country from the list. You should have a reference column in your table pointing to the "Country Codes EN" table. The user will see a dropdown list of all countries and he will choose his country based on name, but underneath, it is the country code that will be selected. 

You can have an initial value set to "20" for this column, so by default Egypt is selected. 

In another field, you let the user enter the phone number, then use the same formula above replacing the fixed "20" by the user's choice. 

[CC] & IF( 
  STARTSWITH([phone], 0),
  RIGHT([phone], LEN([phone]) -1),
  [phone]
)

its working thank you so much    ุชุญูŠุง ู…ุตุฑ ๐Ÿ™‚๐Ÿ™

Top Labels in this Space