+ Reply to Thread
Results 1 to 11 of 11

Formatting of numbers in excel

Hybrid View

hazelbl Formatting of numbers in excel 07-18-2007, 10:30 AM
oldchippy Try this, with your numbers... 07-18-2007, 10:41 AM
hazelbl thanks for that -... 07-18-2007, 11:32 AM
NBVC ...perhaps a combination of... 07-18-2007, 11:46 AM
oldchippy Slighty different to your... 07-18-2007, 11:47 AM
harrywaldron Hi Hazel - This idea may also... 07-18-2007, 11:50 AM
harrywaldron If what NBVC and OC are... 07-18-2007, 11:56 AM
  1. #1
    Registered User
    Join Date
    06-27-2007
    Posts
    7

    Formatting of numbers in excel

    Please help

    We have a list of numbers in a spreadsheet (telephone numbers). The numbers have been put in with () around the country code and hypens separating the rest of the numbers - for example (44) 0111-123456

    Is it possible to remove the formatting to just read as a full number e.g 0111123456? I have loads to do and the thought of doing it manually is painful!

    Please help I am losing my mind!

  2. #2
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Try this, with your numbers in column A ,put this in B1 and copy down

    =MID(A1,FIND(" ",A1,1)+1,10)

    Sorry, try this instead

    =SUBSTITUTE(MID(A1,FIND(" ",A1,1)+1,10),"-","")
    Last edited by oldchippy; 07-18-2007 at 10:44 AM.
    oldchippy
    -------------


    Blessed are those who can give without remembering and take without forgetting

    If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

  3. #3
    Registered User
    Join Date
    06-27-2007
    Posts
    7
    thanks for that - unfortunately it doesn't seem to work. For example from a number that was (44) 0111-123 456 it has brought back 44) 01111 and not the rest of the digits.

    Have I done something wrong?
    Thanks for the help

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    ...perhaps a combination of the 2 functions suggested....


    =SUBSTITUTE(MID(A1,FIND(")",A1)+2,LEN(A1)),"-","")
    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.

  5. #5
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Slighty different to your original number - an extra space added, so try this

    =SUBSTITUTE(SUBSTITUTE(MID(A1,FIND(")",A1,1)+2,20),"-","")," ","")

  6. #6
    Forum Contributor harrywaldron's Avatar
    Join Date
    05-24-2007
    Location
    Roanoke, VA
    MS-Off Ver
    Office Professional 2010 BETA
    Posts
    169
    Hi Hazel - This idea may also help with the different formats.

    1. Make a backup of your spreadsheet (just in case things go wrong)

    2. You might want to copy all phone #'s into a new column (so you can compare before and after)

    3. Now on the new column, highlight the entire column (click on column G at top for example, so all phone #s are selected)

    4. Now you use the menu EDIT >>> REPLACE function

    5. To eliminate all leading parenthesis, key for example:
    FIND WHAT: (
    REPLACE WITH: [don't key anything in here]
    Now select REPLACE ALL button

    6. Now do the same thing for the trailing parenthesis, key for example (keeping the column highlighted as noted in step 3 above):
    FIND WHAT: (
    REPLACE WITH: [don't key anything in here]
    Now select REPLACE ALL button

    7. Now do the same thing for the dashes, key for example:
    FIND WHAT: -
    REPLACE WITH: [don't key anything in here]
    Now select REPLACE ALL button

    8. Now do the same thing for any spaces in the phone field, key for example:
    FIND WHAT: [hit the space bar once]
    REPLACE WITH: [don't key anything in here]
    Now select REPLACE ALL button

    Hope this works for you, as I've used this technique to clean up data often, esp. if the patterns or quality of info varies

  7. #7
    Forum Contributor harrywaldron's Avatar
    Join Date
    05-24-2007
    Location
    Roanoke, VA
    MS-Off Ver
    Office Professional 2010 BETA
    Posts
    169
    If what NBVC and OC are sharing works, please use their approach if you're making progress. There are so many different ways to do things in Excel. I don't want you to get sidetracked as we all posted close to the same time

  8. #8
    Registered User
    Join Date
    06-27-2007
    Posts
    7

    Thumbs up harrywaldron

    Can't tell you how happy I am this morning
    I have a database of over 5000 contacts and this method has helped remove all rouge ( [ - etc..... so THANK YOU!!
    All that remains for me to do is ensure the 0 is added to the start of the telephone number then all done

+ 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