Custom Number in Phone Number Format

muhammad susanto

Well-known Member
Joined
Jan 8, 2013
Messages
2,089
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
hi all...

how to make in custom number format phone number like this (insert mark "-)
e.g

0812-5265-9999
0817-6325-8743
0878-6986-410

thanks in advance..

m.susanto
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
you mean like this?


Excel 2013/2016
AB
10123456789010123-4567-8901
2012345678900123-4567-890
Sheet4
Cell Formulas
RangeFormula
B1=LEFT(A1,4)&"-"&MID(A1,5,4)&"-"&MID(A1,9,4)
 
Upvote 0
If those are entered as numbers without the leading 0, that won't work for the 3rd sample.

Perhaps:
=REPLACE(REPLACE(TEXT(A1,REPT(0,LEN(A1)+1)),5,0,"-"),10,0,"-")


Excel 2010
AB
1812526599990812-5265-9999
2817632587430817-6325-8743
387869864100878-6986-410
Sheet1
Cell Formulas
RangeFormula
B1=REPLACE(REPLACE(TEXT(A1,REPT(0,LEN(A1)+1)),5,0,"-"),10,0,"-")
B2=REPLACE(REPLACE(TEXT(A2,REPT(0,LEN(A2)+1)),5,0,"-"),10,0,"-")
B3=REPLACE(REPLACE(TEXT(A3,REPT(0,LEN(A3)+1)),5,0,"-"),10,0,"-")
 
Last edited:
Upvote 0
Hi,

If you mean Custom Format of the Cell itself.

Select your cell or range of cells you want formatted, right click, Format Cells, Custom, enter 0000-0000-0000

Now when you enter numbers in those cells, the "dash" will be inserted every 4th digits, if the number you entered is less than 12 digits, it will be preceded by leading zeros, keep in mind, this is formatting, it does Not change the Actual value you entered into the cell, Only the appearance (display).
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

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