This post will guide you how to insert or add dashes in phone number with a formula in Excel. How do I add dashes to telephone numbers in a selected range in Excel. How to separate numbers with dashes in Excel.
Table of Contents
Insert Dashes into Phone Numbers
Assuming that you have a whole list of phone numbers that have no dashes or spaces. And you need to insert dashes into those phone numbers in a selected range of cells. And you also want to add dash after the 3rd and 6th numbers in each phone number in Excel. How to do it.
You can use a formula based on the REPLACE function to achieve the result. Just like the following formula:
=REPLACE(REPLACE(B1,4,0,”-”),8,0,”-”)
Type this formula into a blank cell and press Enter key. And then drag the AutoFill handle over to other cells to apply this formula.
Insert Dashes into Phone Numbers Using Format Cell
You can also use the Format Cell feature to achieve the same result of adding dash into phone number in Excel. Here are the steps:
#1 select range of cells that you want to insert dashes in.
#2 right click on it, and select Format Cells from the popup menu list. And the Format Cells dialog will open.
#3 Click Number tab in the Format Cells dialog, and select Custom under Category list box, and type the following format code into the Type text box.
###-###-####
#4 click Ok button. You would notice that all phone numbers have been inserted dashes in the selected range of cells.
Related Functions
- Excel Replace function
The Excel REPLACE function replaces all or part of a text string with another text string.The syntax of the REPLACE function is as below:=REPLACE (old_text, start_num, num_chars, new_text)…
Leave a Reply
You must be logged in to post a comment.