+ Reply to Thread
Results 1 to 10 of 10

add : to every two digits

  1. #1
    Registered User
    Join Date
    11-12-2012
    Location
    usa
    MS-Off Ver
    Excel 2007
    Posts
    9

    add : to every two digits

    Hi everyone,

    I have this no. 256587815212 and I would like to add: to every two digits of it. Meaning I need it like 25:65:87:81:52:12

    There is column that has random values and I need to do the same thing to the whole column.

    Thanks,
    Last edited by centro; 11-16-2012 at 07:39 PM.

  2. #2
    Registered User
    Join Date
    11-16-2012
    Location
    Crownpoint, New Mexico
    MS-Off Ver
    All.
    Posts
    59

    Re: add : to every two digits

    Are all the numbers the same length?
    Please click * to add to my reputation!

  3. #3
    Registered User
    Join Date
    11-12-2012
    Location
    usa
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: add : to every two digits

    They are all same...

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: add : to every two digits

    some1 will probably come up with a fancy custom formatting for you, but this will work as well...
    =LEFT(A1,2)&":"&MID(A1,3,2)&":"&MID(A1,5,2)&":"&MID(A1,7,2)&":"&MID(A1,9,2)&":"&MID(A1,11,2)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Registered User
    Join Date
    11-16-2012
    Location
    Crownpoint, New Mexico
    MS-Off Ver
    All.
    Posts
    59

    Re: add : to every two digits

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    11-16-2012
    Location
    Crownpoint, New Mexico
    MS-Off Ver
    All.
    Posts
    59

    Re: add : to every two digits

    Dang nabbit! Good thing I'm not a gunfighter!

  7. #7
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: add : to every two digits

    Another way:

    =TEXT(A1, "00\:00\:00\:00\:00\:00")
    Entia non sunt multiplicanda sine necessitate

  8. #8
    Registered User
    Join Date
    11-12-2012
    Location
    usa
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: add : to every two digits

    This doesnt work Shg

  9. #9
    Registered User
    Join Date
    11-12-2012
    Location
    usa
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: add : to every two digits

    Perfect guys!

  10. #10
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: add : to every two digits

    you are welcome. and btw, i just tried shg's option, and it worked fine for me

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. I'll do that for you now but please keep in mind for your future threads that Rule #9 requires you to do that yourself. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, as a relatively new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ 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