+ Reply to Thread
Results 1 to 6 of 6

converting decimal (hh.mm) in hh:mm format

  1. #1
    Forum Contributor
    Join Date
    11-10-2012
    Location
    India
    MS-Off Ver
    Excel 2003 to Excel 2010
    Posts
    235

    converting decimal (hh.mm) in hh:mm format

    How can i change hours and minutes (which are in decimal ) to hh:mm format.
    File is attached for ref.
    Attached Files Attached Files
    Click on (*), if you agree.

  2. #2
    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
    53,052

    Re: converting decimal (hh.mm) in hh:mm format

    excel doesnt really like showing hours over 24. so it may be better to keep the times in that format.

    when I convert 230.25 with...
    =TIME(LEFT(B3,SEARCH(".",B3,1)-1)*1+(INT(B3/24)*24),RIGHT(B3,2)*1,0)
    it gives me 14:25
    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

  3. #3
    Forum Contributor
    Join Date
    11-10-2012
    Location
    India
    MS-Off Ver
    Excel 2003 to Excel 2010
    Posts
    235

    Re: converting decimal (hh.mm) in hh:mm format

    Quote Originally Posted by FDibbins View Post
    excel doesnt really like showing hours over 24. so it may be better to keep the times in that format.

    when I convert 230.25 with...
    =TIME(LEFT(B3,SEARCH(".",B3,1)-1)*1+(INT(B3/24)*24),RIGHT(B3,2)*1,0)
    it gives me 14:25
    sir ... 230.25 means ... There are 230 HOURS and 15 minutes.


    so it should show 230:15 (hh:mm)
    Hope now you are cleared.

  4. #4
    Valued Forum Contributor Lemice's Avatar
    Join Date
    04-13-2013
    Location
    Somewhere.
    MS-Off Ver
    Excel 2016
    Posts
    696

    Re: converting decimal (hh.mm) in hh:mm format

    Hello,

    On C3, you can paste this formula
    Please Login or Register  to view this content.
    However, as FDibbins said, Excel will not show hh:mm over 24 hours, so this is just a rough way to force the number into text.

    Edit: Aparently you can format it to actually look like hh:mm that is over 24 hours. See post #5 for details.
    Last edited by Lemice; 05-04-2013 at 06:20 AM.
    (copy pasta from Ford)
    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

    Regards,
    Lem

  5. #5
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,800

    Re: converting decimal (hh.mm) in hh:mm format

    Quote Originally Posted by FDibbins View Post
    excel doesnt really like showing hours over 24
    That's not true.

    Use this formula in C3

    =B3/24

    custom format as [h]:mm and you'll get 230:15
    Audere est facere

  6. #6
    Valued Forum Contributor Lemice's Avatar
    Join Date
    04-13-2013
    Location
    Somewhere.
    MS-Off Ver
    Excel 2016
    Posts
    696

    Re: converting decimal (hh.mm) in hh:mm format

    Wow, I have never known that before. Thanks daddylonglegs for the solution, that's a great one!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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