+ Reply to Thread
Results 1 to 5 of 5

Phone Number Formatting

  1. #1
    Registered User
    Join Date
    07-20-2012
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    5

    Phone Number Formatting

    Hey guys,

    I'm new here (However my friend assures me this is the place to come for excel problems and insists you are all geniuses) so apologies if this is in the wrong place but with my limited experience with excel I figured VBA would probably be the best way to do this?

    Basically I have a column full of phone numbers that are in varying formats and I need them all in the same format. This is made more complicated by the fact that not all the numbers are UK numbers or even the same length, however a majority are and are currently displayed as either;

    + 44 XXXX XXXXXX
    + 44 XX XXXXXXXX
    + 44 XXX XXXXXXX

    Then a range of weird and wonderful other combinations.

    and they need to be displayed as;

    + 44 XXX XXX XXXX

    If I could get at least the above formats to convert to the way I need them to be displayed then I could do the few remaining manually but it would help massively.

    Is VBA the best way to do this? If so where do I start? (I'm relatively new to Excel, let alone VBA)

    Thanks a lot guys!

  2. #2
    Valued Forum Contributor smuzoen's Avatar
    Join Date
    10-28-2011
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2003/2007/2010
    Posts
    610

    Re: Phone Number Formatting

    You can select the cells with the numbers and then Right Click, Select Format, Custom, then in the box below Type enter in +## ### ### ####. If that does not work just upload a sample workbook with no sensitive data to see how the numbers are set out/currently formatted
    Hope this helps.
    Anthony
    Pack my box with five dozen liquor jugs
    PS: Remember to mark your questions as Solved once you are satisfied. Please rate the answer(s) by selecting the Star in the lower left next to the Triangle. It is appreciated?

  3. #3
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Phone Number Formatting

    Hi and welcome to the forum.

    Can you upload a small sample workbook to test it?

    "To attach a file, push the button with the paperclip (or scroll down to the Manage Attachments button), browse to the required file, and then push the Upload button"
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  4. #4
    Registered User
    Join Date
    07-20-2012
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Phone Number Formatting

    Hey guys,

    Thanks for the responses, Please find attached a sample workbook. I left the other columns blank although in my book they are obviouslly full. (There are also 500+ entries as opppsosed to 22)

    I've obviously also changed all the phone numbers too but the formats are the same.

    Thanks again guys, I appreciate the help.
    Attached Files Attached Files

  5. #5
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,521

    Re: Phone Number Formatting

    Your example solution in thread #1 has 17 characters including the spaces. (+ 44 XXX XXX XXXX)
    In your attachment, the numbers with a prefix 44 have anywhere from 16 to 19 characters total.
    What is the determining factor in how to split it up?
    And what is the determing factor for the other numbers?

    This will do what you original asked for in thread #1 but it does not take the above mentioned differences in consideration.

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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