+ Reply to Thread
Results 1 to 10 of 10

How to convert Time to number

  1. #1
    Registered User
    Join Date
    05-14-2013
    Location
    Charlotte, NC
    MS-Off Ver
    Office 2013
    Posts
    19

    How to convert Time to number

    I can't figure out how to convert Time in format (dd:hh:mm) into number (01:11:50 = 35.83333) ~ Time is in cell "G3" and number needs to be in cell "G5".
    I also can't figure out the formula to sum the time if time starts 11:00 PM and ends 7:00 AM (Times are manually entered into two different cells and formula for sum total is in third in format hh:mm).

    Thanks,
    Master Foo

  2. #2
    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: How to convert Time to number

    Please Login or Register  to view this content.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    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,929

    Re: How to convert Time to number

    For the 2nd part, try this...
    =(IF(A2>B2,1,0)+B2)-A2
    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

  4. #4
    Registered User
    Join Date
    05-14-2013
    Location
    Charlotte, NC
    MS-Off Ver
    Office 2013
    Posts
    19

    Re: How to convert Time to number

    I don't use 'Seconds' so I converted it to (=24*HOUR(G3) + MINUTE(G3)/60) and it returns 264.83333 instead of 35.83333

  5. #5
    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,929

    Re: How to convert Time to number

    Leave the seconds on, if you dont have any, it wont make any difference

  6. #6
    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: How to convert Time to number

    Quote Originally Posted by Master Foo View Post
    I don't use 'Seconds' so I converted it to (=24*HOUR(G3) + MINUTE(G3)/60) and it returns 264.83333 instead of 35.83333
    I don't know what that means. Excel interprets the value as hh:mm:ss regardless of what you intended, unless it's stored as text. My formula returns the correct result, no?

  7. #7
    Registered User
    Join Date
    05-14-2013
    Location
    Charlotte, NC
    MS-Off Ver
    Office 2013
    Posts
    19

    Re: How to convert Time to number

    I put (=24*HOUR(G3) + MINUTE(G3) + SECOND(G3)/60) in cell G5 and it returns 314.00000 **(G3 is in format dd:hh:mm and shows 01:11:50 which equals 35hrs 50min)
    This is the formula in G3: (=IF(D2="","",SUM(D2,D5,D8,D11,D14,D17,D20,D23,D26,D29,D32,D35,D38,D41)))
    Last edited by Master Foo; 07-08-2013 at 05:29 PM.

  8. #8
    Registered User
    Join Date
    05-14-2013
    Location
    Charlotte, NC
    MS-Off Ver
    Office 2013
    Posts
    19

    Re: How to convert Time to number

    Second part works Great.

    Thank you,
    Master Foo

  9. #9
    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: How to convert Time to number

    Quote Originally Posted by Master Foo View Post
    I put (=24*HOUR(G3) + MINUTE(G3) + SECOND(G3)/60) in cell G5 and it returns 314.00000 **(G3 is in format dd:hh:mm and shows 01:11:50 which equals 35hrs 50min)
    Ah, I get it.

    Please Login or Register  to view this content.
    Last edited by shg; 07-08-2013 at 05:51 PM.

  10. #10
    Registered User
    Join Date
    05-14-2013
    Location
    Charlotte, NC
    MS-Off Ver
    Office 2013
    Posts
    19

    Re: How to convert Time to number

    That works perfect. So simple it just eluded me. Duh (Smacks self on forehead)

    Thank you,
    Master Foo

+ 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