Converting a number into particular format

Harry_1234

New Member
Joined
Aug 19, 2017
Messages
47
Hello,

What is the best way to convert following format into e.164 in excel i.e. i would like to convert numbers in the format 123 456-0001 to \+11234560001.
Column A Column B

123 456-0001 \+11234560001
123 456-0005 \+11234560005
123 456-1000 \+11234561000
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
The B1 formula here should do the trick:
Book2
AB
1123 456-0001\+11234560001
Sheet1
Cell Formulas
RangeFormula
B1B1=INT(SUBSTITUTE(SUBSTITUTE(A1,"-","")," ",""))

You can either prepend the "\+1" or number format adding "\+1" (what I did here).
Whether this is the "best" way probably depends on factors that are not outlined here - e.g. I have presumed that the 123 456-0001 is text and not a representation presented by a formula, etc.
 
Upvote 0
The B1 formula here should do the trick:
Book2
AB
1123 456-0001\+11234560001
Sheet1
Cell Formulas
RangeFormula
B1B1=INT(SUBSTITUTE(SUBSTITUTE(A1,"-","")," ",""))

You can either prepend the "\+1" or number format adding "\+1" (what I did here).
Whether this is the "best" way probably depends on factors that are not outlined here - e.g. I have presumed that the 123 456-0001 is text and not a representation presented by a formula, etc.
Thank you!! This was really helpful.
 
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