Inlude the Country code to a regular phone number

Antoan

New Member
Joined
Nov 29, 2021
Messages
26
Office Version
  1. 2016
Platform
  1. Windows
Hello everyone!

So as you can see from the description there my question is related to converting a regular phone number to including the country code to it. The regular phone numbers I have start with "0", however when i include the country code to it with a simple formula (="+380"&[@[phone_1]]) . However, the version with the country code included, should exclude the "0" from the regular number, otherwise its wrong and I coudnt use it.

Hope that explains a bit my case!


Looking foward to hearing from you!

Your contribution would be highly appreciated! :)

phone_1phone_1.2
0347725311+3800347725311
0442660693+3800442660693
0442362605+3800442362605
0342584568+3800342584568
0462231544+3800462231544
0484041740+3800484041740
0512477717+3800512477717
0313137680+3800313137680
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Instead of text, why not a custom number format to display the text but maintain the possibility for calculations etc.

Excel Formula:
+38\00
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0
Instead of text, why not a custom number format to display the text but maintain the possibility for calculations etc.

Excel Formula:
+38\00
Thank you so much for the help! Happily the above mentioned formula, should work perfectly here. However i will most likely experience problems further if i need to use another country code that doesn't end with "0". For some reason, i dont seem to understand the formula that you posted. Could you give me further clarification, how i can use it?
Thanks in advance! :)
 
Upvote 0
Thank you so much for the help! Happily the above mentioned formula, should work perfectly here. However i will most likely experience problems further if i need to use another country code that doesn't end with "0". For some reason, i dont seem to understand the formula that you posted. Could you give me further clarification, how i can use it?
Thanks in advance! :)
You shouldn't have any problems with other countrycodes not ending with zero. All this above formula does is:

* '+38' - Hardcode the leading mentioned pattern;
* '\0' - Hardcode a zero. Since a '0' has special meaning in number formatting we need to escape it to make it literal. This makes the total leading pattern '+380';
* '0' - As mentioned above, a zero has special meaning in number formatting. It is used to force the display of insignificant zeros when a number has fewer digits than zeros in the format.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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