+ Reply to Thread
Results 1 to 5 of 5

Add a Zero to some fields

  1. #1
    Registered User
    Join Date
    10-26-2009
    Location
    Brighton
    MS-Off Ver
    Excel 2007
    Posts
    5

    Add a Zero to some fields

    I have a dozen columns that contain phone numbers in some cells over 500 rows. As part of an import error made by myself it has knocked off the first zero. Even if I change the columns to text fields the zeros have now gone.

    What I need to do I guess is use some form of formula (if statement???) where if it detects a 0 as the left most char then ignore it, but if it detects a set of numbers already in the field, I would like it to insert a zero on the far left of the number and leave the rest in place.

    Any ideas anyone?

    Thanks in advance

  2. #2
    Forum Expert
    Join Date
    09-27-2011
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    1,312

    Re: Add a Zero to some fields

    Hi try this formula:
    Please Login or Register  to view this content.
    Regards

    tom1977

    If You are satisfied with my solution click the small star icon on the left to say thanks.

  3. #3
    Registered User
    Join Date
    10-26-2009
    Location
    Brighton
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Add a Zero to some fields

    I have 500 rows and a number of columns that I need to apply this to. Please excuse my inexperience but how do I apply your solution?

    Thanks & Apologies

  4. #4
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: Add a Zero to some fields

    Hi Talisa

    Click on the cell where you have entered the formula, hover your mouse over the bottom right hand cell until it becomes a cross, left click, hold down your mouse key and drag up or down.
    Alternatively when the you hover your mouse until it becomes a cross at the bottom right of the cell, double left click to send it down.

  5. #5
    Forum Contributor
    Join Date
    09-29-2011
    Location
    Kolkata, India
    MS-Off Ver
    Excel 2003/2007
    Posts
    182

    Re: Add a Zero to some fields

    Hi Talisa,

    Every phone no. has fixed length. Say in India mobile numbers contains 10 digits. If you have lost a zero in begining you can cross check using below formula and correct you data.
    Say, cell A1 contains your phone number with 9 digits (instead of 10). Write below code in cell B1 and so on.....

    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