+ Reply to Thread
Results 1 to 6 of 6

Ad 0 to cell with both nuber and text

  1. #1
    Registered User
    Join Date
    07-04-2013
    Location
    ccewc
    MS-Off Ver
    Excel 2010
    Posts
    4

    Ad 0 to cell with both nuber and text

    Hi!

    I have loads of cells containing a zip code + area name

    The 0 in Area codes starting with "0" have been removed, so a lot of the cells have three digits + area name

    How do I add a 0 to all cells that only have three digits + text in the same cell?

    Thanks alot!

  2. #2
    Registered User
    Join Date
    06-27-2013
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2007
    Posts
    94

    Re: Ad 0 to cell with both nuber and text

    Have you tried changing the format of that column to text instead of number?

  3. #3
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Ad 0 to cell with both nuber and text

    Try

    =IF(ISNUMBER(LEFT(A1,4)*1),A1,0&A1)
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  4. #4
    Forum Contributor Bhuvi's Avatar
    Join Date
    04-19-2013
    Location
    Delhi, India
    MS-Off Ver
    MS Excel 2003,07,10
    Posts
    153

    Re: Ad 0 to cell with both nuber and text

    Hi Chrisdue,

    It would be much better if you can attach a sample sheet with some data.

  5. #5
    Registered User
    Join Date
    07-04-2013
    Location
    ccewc
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Ad 0 to cell with both nuber and text

    Thanks Ace, you almost solved my problem!

    Problem now is that the cells with 4 digits allready also add a 0

    eks bilde.jpg

    Any idea?

    Thanks again!

  6. #6
    Forum Contributor
    Join Date
    07-02-2013
    Location
    Stockholm, Sweden
    MS-Off Ver
    Excel 2003 and 2007
    Posts
    197

    Re: Ad 0 to cell with both nuber and text

    Use this formula in N2:

    =IF(LEN(LEFT(M2,FIND(" ",M2,1)-1))=3,0&M2,M2)

    Copy down

+ 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