+ Reply to Thread
Results 1 to 6 of 6

Need to format phone number properly

  1. #1
    Registered User
    Join Date
    04-16-2024
    Location
    Phoenix, AZ
    MS-Off Ver
    365
    Posts
    2

    Need to format phone number properly

    I have a data set that is populated for me with people who have opted out of receiving text messages. When I export this data set into excel it automatically places a 1 before the phone number.

    Example - 15555555555

    What I need is to remove the 1 before the phone number AND be able to reformat into (555) 555-5555

    I have tried =right(A1,len(A1)-1) which removes the 1 and leaves me with the 9 digits I need BUT I can't seem to then format into (555) 555-5555.

    Any ideas?

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,998

    Re: Need to format phone number properly

    Welcome to the forum.

    Try:

    ="("&MID(A1,2,3)&") "&MID(A1,5,3)&"-"&RIGHT(A1,4)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    04-16-2024
    Location
    Phoenix, AZ
    MS-Off Ver
    365
    Posts
    2

    Re: Need to format phone number properly

    This worked perfectly! Thank you!

  4. #4
    Valued Forum Contributor Root_'s Avatar
    Join Date
    07-29-2017
    Location
    _
    MS-Off Ver
    2010+
    Posts
    485

    Re: Need to format phone number properly

    Just for fun:

    =TEXT(REPLACE(A1,1,1,""),"(000) 000-0000")

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,998

    Re: Need to format phone number properly

    Glad to have helped.

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED. You can also access the SOLVED tag by editing the opening post and choosing SOLVED from the drop-down to the left of the title box.

    Also, if you have not already done so, remember that you can reward anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) 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 each of those who offered help.

  6. #6
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,447

    Re: Need to format phone number properly

    Or only =REPLACE(A1,1,1,"") and custom format the cells: "(000) 000-0000"
    Last edited by AliGW; 04-17-2024 at 04:42 AM. Reason: Please don't quote unnecessarily - use the Quick Reply button instead.

+ 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. Extract non-phone number format
    By Shawnbrero in forum Excel General
    Replies: 3
    Last Post: 09-15-2022, 11:46 AM
  2. [SOLVED] if conditional format, then a phone number
    By chubbychub in forum Excel General
    Replies: 4
    Last Post: 06-12-2020, 04:44 AM
  3. For Format Phone Number
    By Imrank in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-19-2018, 03:59 AM
  4. [SOLVED] Macro to format phone number
    By cjamps in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-09-2017, 07:22 AM
  5. [SOLVED] Phone number format - reference post (Formatting Textbox to type phone numbers only)
    By eddyrcabrera79 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-01-2015, 05:35 PM
  6. Format a Phone Number
    By scotfitz in forum Excel General
    Replies: 4
    Last Post: 12-23-2009, 07:01 PM
  7. how do I add phone number format as a permanent custom format?
    By frustratedagain in forum Excel General
    Replies: 3
    Last Post: 02-03-2006, 11:52 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