+ Reply to Thread
Results 1 to 7 of 7

insert character into string in entire column

  1. #1
    Registered User
    Join Date
    07-10-2008
    Location
    Atlanta
    Posts
    65

    insert character into string in entire column

    I have a column of numbers that I need to edit. I need to insert a "-" after every 3rd character. Not all of the cells have the same # of characters.

    ex.
    9896051
    9927091
    11763321
    13182041

    needs to be
    989-605-1
    992-709-1
    117-633-21
    131-820-41
    Last edited by Onestopfanshop; 10-05-2010 at 09:20 AM.

  2. #2
    Forum Contributor
    Join Date
    05-29-2009
    Location
    Kalgoorlie Australia
    MS-Off Ver
    Excel 2007/10
    Posts
    251

    Re: insert character into string in entire column

    Hello OSFS
    does it have to be formatted in that way or can it be
    9-896-051
    9-927-091
    11-763-321
    13-182-041
    If the above is ok then FORMATT, CELLS, CUSTOM, AND TYPE IN ###-###-###
    Let me know if this is OK please
    Regards
    Peter

  3. #3
    Registered User
    Join Date
    07-10-2008
    Location
    Atlanta
    Posts
    65

    Re: insert character into string in entire column

    Quote Originally Posted by peterjuhnke View Post
    Hello OSFS
    does it have to be formatted in that way or can it be
    9-896-051
    9-927-091
    11-763-321
    13-182-041
    If the above is ok then FORMATT, CELLS, CUSTOM, AND TYPE IN ###-###-###
    Let me know if this is OK please
    Regards
    Peter
    It needs to be xxx-xxx-x or xxx-xxx-xxx. I always need the first dash after the 3rd character.

  4. #4
    Forum Contributor
    Join Date
    05-29-2009
    Location
    Kalgoorlie Australia
    MS-Off Ver
    Excel 2007/10
    Posts
    251

    Re: insert character into string in entire column

    OSFS
    Please have a look at this, the numbers now have the dashes but are still a true number(not text), just the formatting has been changed.
    Regards
    Peter
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    05-29-2009
    Location
    Kalgoorlie Australia
    MS-Off Ver
    Excel 2007/10
    Posts
    251

    Re: insert character into string in entire column

    Sorry I've just done the exact oposite, I'm not sure you can format the number from the left, can there be formulas involved, how many numbers involved, if need be can there be work colmns (hidden if you like.
    May be able to format if the numbers are stored as text as it works left to right
    Regards
    Peter

  6. #6
    Forum Contributor
    Join Date
    05-29-2009
    Location
    Kalgoorlie Australia
    MS-Off Ver
    Excel 2007/10
    Posts
    251

    Re: insert character into string in entire column

    Please have a look, this is using a work column, but could be combined if it is a problem.
    Regards
    Peter
    The numbers are no longer stored as numbers.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    07-10-2008
    Location
    Atlanta
    Posts
    65

    Re: insert character into string in entire column

    Thanks. Works great.

+ 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