+ Reply to Thread
Results 1 to 9 of 9

Phone Number Formatting

  1. #1
    Registered User
    Join Date
    01-08-2018
    Location
    India
    MS-Off Ver
    2013
    Posts
    56

    Phone Number Formatting

    Hi Team,

    need help to apply a format on phone number as per the below condition

    First 3 digits in brackets, then a space then next 3 digits then hyphen"-" then all remaining digits only.

    for E.g
    data available like "(97)1-718- 11-71", data require in format like: (971) 718-1171


    I have also attached the a excel sheet with similar data.

    regards,
    Ashok
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,514

    Re: Phone Number Formatting

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

    then copy down.

  3. #3
    Registered User
    Join Date
    01-08-2018
    Location
    India
    MS-Off Ver
    2013
    Posts
    56

    Re: Phone Number Formatting

    Thanks Jindon

    the above formula is giving output "(21808) 111-1722" if value in cell is 218081-111722


    Regards,
    Ashok

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,514

    Re: Phone Number Formatting

    How do you want it?

  5. #5
    Valued Forum Contributor meabrams's Avatar
    Join Date
    10-03-2014
    Location
    USA
    MS-Off Ver
    2007, 2010, 2013, 2016
    Posts
    451

    Re: Phone Number Formatting

    Try

    Not sure what number is the extra number on that one or how you want that to display

    Macro
    Please Login or Register  to view this content.
    Formula
    Please Login or Register  to view this content.
    Bramz

  6. #6
    Registered User
    Join Date
    01-08-2018
    Location
    India
    MS-Off Ver
    2013
    Posts
    56

    Re: Phone Number Formatting

    required data must be in format "(218) 081-111722

    formula provided by you is working perfectly with 10 digits of numbers, but it give invalid format if number are less then 10 or more then 10 digits.

    Regards,
    Ashok

  7. #7
    Registered User
    Join Date
    01-08-2018
    Location
    India
    MS-Off Ver
    2013
    Posts
    56

    Re: Phone Number Formatting

    @meabrams, the macro is also working fine but with 10 digits only, it adds "0" if digits are less then 10 and gives error if digits are more then 10.

  8. #8
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,514

    Re: Phone Number Formatting

    B2
    =GetPhone(A2)

    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    01-08-2018
    Location
    India
    MS-Off Ver
    2013
    Posts
    56

    Re: Phone Number Formatting

    Thanks Jindon,
    Thanks meabrams

    Finally the "GetPhone" is working with all the numbers.

    regards,
    Ashok


    Regards,
    Ashok
    Last edited by ashok0141; 08-27-2018 at 09:01 AM.

+ 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. [SOLVED] Phone number formatting
    By Carmella in forum Excel General
    Replies: 9
    Last Post: 04-08-2017, 07:45 PM
  2. [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
  3. phone number formatting
    By djbetterly in forum Excel General
    Replies: 2
    Last Post: 12-08-2009, 06:06 PM
  4. Phone Number formatting
    By ChrisMattock in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-22-2006, 10:10 AM
  5. [SOLVED] PHONE NUMBER formatting
    By [email protected] in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-12-2006, 12:50 PM
  6. [SOLVED] Formatting a Phone Number
    By Formatting Phone Number in forum Excel General
    Replies: 3
    Last Post: 04-06-2006, 03:30 PM
  7. [SOLVED] Phone Number Formatting
    By Brant Nyman in forum Excel General
    Replies: 5
    Last Post: 08-25-2005, 02: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