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

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
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,214,528
Messages
6,120,064
Members
448,941
Latest member
AlphaRino

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