+ Reply to Thread
Results 1 to 10 of 10

Convert phone numbers formats (xxx)xxx-xxxx to xxx-xxx-xxxx using formula or function

  1. #1
    Registered User
    Join Date
    11-05-2013
    Location
    Chicago
    MS-Off Ver
    Excel 2007
    Posts
    5

    Convert phone numbers formats (xxx)xxx-xxxx to xxx-xxx-xxxx using formula or function

    Hi!
    I'm pulling large amounts of data to excel file from 2 databeses (websites)
    I have one database of phone numbers that I download to excel as xxx-xxx-xxxx
    Another database of phone numbers I download to excel as (xxx)xxx-xxxx
    Often I need to find a match of a multiple phone numbers, so I need to have them in the same format.
    How can I convert in excel one to another between those 2 formats using function or formula?
    Also
    How can I convert format (xxx)xxx-xxxx to just xxxxxxxxxx?
    Thanks

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,872

    Re: Convert phone numbers formats (xxx)xxx-xxxx to xxx-xxx-xxxx using formula or function

    apply this in a column adjacent to the number in (xxx)-xxx-xxxx format assuming it is in Column A

    =MID(A1,2,3)&MID(A1,7,3)&RIGHT(A1,4)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Convert phone numbers formats (xxx)xxx-xxxx to xxx-xxx-xxxx using formula or function

    This should do what you want for numbers like (123)-456-7890 if the number was entered like this and not an applied format. This will even handle entries like 123-456-7890

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  4. #4
    Registered User
    Join Date
    11-05-2013
    Location
    Chicago
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Convert phone numbers formats (xxx)xxx-xxxx to xxx-xxx-xxxx using formula or function

    I was trying to use this formula =MID(A1,2,3)&MID(A1,7,3)&RIGHT(A1,4)
    and that's how it came up after applying:
    (716)940-5341 71640-5341
    So the 4th number in the phone number was missing.
    So lets say that number that I need to convert would be in the cell D2. What would be the correct formula?

  5. #5
    Registered User
    Join Date
    11-05-2013
    Location
    Chicago
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Convert phone numbers formats (xxx)xxx-xxxx to xxx-xxx-xxxx using formula or function

    Thank you Newdowerman for your formula.
    Your formula though converted phone number like this from (716)940-5341 to 7169405341 no dashes. I need that too. Its very helpful. Is there a way to change this formula so it will convert (716)940-5341 to 716-940-5341?

  6. #6
    Valued Forum Contributor
    Join Date
    10-29-2012
    Location
    Mojokerto,Indonesia
    MS-Off Ver
    Excel 2007
    Posts
    554

    Re: Convert phone numbers formats (xxx)xxx-xxxx to xxx-xxx-xxxx using formula or function

    =mid(substitute(a1,")","-"),2,len(a1))

  7. #7
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Convert phone numbers formats (xxx)xxx-xxxx to xxx-xxx-xxxx using formula or function

    This should do it

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    11-05-2013
    Location
    Chicago
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Convert phone numbers formats (xxx)xxx-xxxx to xxx-xxx-xxxx using formula or function

    Thank you Alansidman!
    I just figure out the way so it will show correct values in conversion of (123)456-7890 to 123-456-7890. Here is the formula:
    =MID(A1,2,3)&"-"&MID(A1,6,3)&"-"&RIGHT(A1,4)
    Thanks again for steering me in the right direction

  9. #9
    Registered User
    Join Date
    11-05-2013
    Location
    Chicago
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Convert phone numbers formats (xxx)xxx-xxxx to xxx-xxx-xxxx using formula or function

    Excellent Ghozi. Worked like a charm. Thanks

  10. #10
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: Convert phone numbers formats (xxx)xxx-xxxx to xxx-xxx-xxxx using formula or function

    FORUM MODERATOR'S REQUEST:

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as "SOLVED".
    For the meantime I'll do it for you.

    How?
    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    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

    Note:
    You can also thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given.
    By doing so you can add to the reputation(s) of those who helped and shared their time in helping you.
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Fine Phone Number Pattern xxx-xxx-xxxx
    By halama in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-03-2013, 11:33 PM
  2. String manipulation xxx/xxxx/xxxx//
    By mikedu in forum Excel General
    Replies: 3
    Last Post: 04-13-2011, 04:33 PM
  3. Replies: 3
    Last Post: 08-06-2009, 03:02 PM
  4. [SOLVED] How do I change phone numbers from "xxxxxxxxxx" to "xxx-xxx-xxxx
    By Frank @ St. Louis in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 PM
  5. Replies: 1
    Last Post: 07-01-2005, 06:05 PM

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