+ Reply to Thread
Results 1 to 6 of 6

Insert dashes in phone numbers

  1. #1
    Registered User
    Join Date
    01-14-2009
    Location
    Baltimore, MD
    MS-Off Ver
    Excel 2003
    Posts
    2

    Question Insert dashes in phone numbers

    I have a whole list of phone numbers that have no dashes or spaces. I need to know how to insert dashes after the 3rd and 6th numbers to clean up the formatting

    Thanks

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Try:

    =REPLACE(REPLACE(A1,4,0,"-"),8,0,"-")

    where A1 contains the original

    Edit:You can then copy\Paste Special Values over the original column and delete the formula column.
    .
    .
    Last edited by NBVC; 01-14-2009 at 03:00 PM. Reason: added Edit note
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    An alternative it so simply use custom formatting.

    Format > Cells, on the Format tab, select Custom, and use ###-###-####

    HTH

    Jason

  4. #4
    Registered User
    Join Date
    01-14-2009
    Location
    New York City, US
    MS-Off Ver
    Excel 2007
    Posts
    18
    Text to Columns, delineate by fixed width at 3rd and 6th digit. Create a column of dashes between the area code and the first 3, then between the first 3 and last 4. Function _> concatenate _> select the 5 columns. Copy, paste the values.... tada!

    Or you can do it the easy way ^

  5. #5
    Registered User
    Join Date
    01-14-2009
    Location
    Baltimore, MD
    MS-Off Ver
    Excel 2003
    Posts
    2
    Thanks to all, That worked

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1