change "two points" by a comma
Results 1 to 6 of 6

Thread: change "two points" by a comma
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    Board Regular
    Join Date
    Mar 2013
    Posts
    295
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default change "two points" by a comma

    Hi.
    how do I change "two points" by a comma?
    Code:
    Sub test()    [B2].Value = Replace([A2].Value, ":", ",")
    End Sub
    Ex:
    196:35:00 --> 196,35
    76:46:00 ---> 76,46

  2. #2
    MrExcel MVP Rick Rothstein's Avatar
    Join Date
    Apr 2011
    Location
    New Jersey, USA
    Posts
    35,116
    Post Thanks / Like
    Mentioned
    92 Post(s)
    Tagged
    33 Thread(s)

    Default Re: change "two points" by a comma

    Quote Originally Posted by elsg View Post
    Hi.
    how do I change "two points" by a comma?
    Code:
    Sub test()    [B2].Value = Replace([A2].Value, ":", ",")
    End Sub
    Ex:
    196:35:00 --> 196,35
    76:46:00 ---> 76,46
    The main question I have, for now, is what is actually in cell A2 right now... 196:35:00 as Text or 1/8/1900 5:35:00 AM as a date? Select cell A2, look at the Formula Bar and post back what you saw.
    Rick's "mini" blog... http://www.excelfox.com/forum/f22/
    .
    Want to post a small screen shot? See Part B here.

  3. #3
    Board Regular
    Join Date
    Mar 2013
    Posts
    295
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: change "two points" by a comma

    Hi.

    This
    08/01/1900 04:35:00

  4. #4
    MrExcel MVP DonkeyOte's Avatar
    Join Date
    Sep 2002
    Location
    Suffolk, UK
    Posts
    9,118
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: change "two points" by a comma

    Given the above perhaps:

    Code:
    B2: 
    =TEXT(A2,"[hh],mm")
    Assuming you want as a literal string else adjust format of A2 to [hh],mm
    Does my a$$ look big in this picture ?

  5. #5
    MrExcel MVP Rick Rothstein's Avatar
    Join Date
    Apr 2011
    Location
    New Jersey, USA
    Posts
    35,116
    Post Thanks / Like
    Mentioned
    92 Post(s)
    Tagged
    33 Thread(s)

    Default Re: change "two points" by a comma

    Quote Originally Posted by DonkeyOte View Post
    Given the above perhaps:

    Code:
    B2: 
    =TEXT(A2,"[hh],mm")
    Assuming you want as a literal string else adjust format of A2 to [hh],mm
    Correct... that is what I was expecting would be the answer when I asked my question; although I was thinking only one h inside the square brackets (not sure the OP would actually want to see leading zeroes, but I could be wrong on that).
    Rick's "mini" blog... http://www.excelfox.com/forum/f22/
    .
    Want to post a small screen shot? See Part B here.

  6. #6
    Board Regular
    Join Date
    Mar 2013
    Posts
    295
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: change "two points" by a comma

    my friends was great!!


    DonkeyOte thanks!!


    thanks to all

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •