+ Reply to Thread
Results 1 to 5 of 5

Convert 32:15 minutes to 32.25 decimal hours

  1. #1
    Forum Contributor
    Join Date
    12-21-2004
    Location
    MN
    MS-Off Ver
    Microsoft 365
    Posts
    211

    Convert 32:15 minutes to 32.25 decimal hours

    I have a timesheet that adds the total hours for a week. For a particular code, an employee worked 32 hours and 15 minutes. In order for me to enter them into our system, I need them in decimal hours, and this case it would be 32.25 hours.

    I need a formula to do this automatically. I am using, =IF(R8="","",(R8-INT(R8))*24) which works fine for when there is less than 24 hours, but it won't work in cases like this, and this happens frequently.

  2. #2
    Valued Forum Contributor
    Join Date
    03-25-2004
    Location
    Boston, MA US
    Posts
    1,094
    Karstens,

    Try,

    =CONVERT(A1,"day","hr")

    Where A1 is your 32:15.

    HTH

    Steve

  3. #3
    Forum Contributor
    Join Date
    12-21-2004
    Location
    MN
    MS-Off Ver
    Microsoft 365
    Posts
    211
    AWESOME! Thank you so much. I have been struggling with that....I appreciate your help!!

  4. #4
    Valued Forum Contributor
    Join Date
    03-25-2004
    Location
    Boston, MA US
    Posts
    1,094
    Karsten's,

    You're welcome. Glad I could help. Thanks for the feedback.

    Cheers,

    Steve

  5. #5
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    Hello karstens,

    You shouldn't really need CONVERT for this, multiplying by 24 should be sufficient. The problem with

    =IF(R8="","",(R8-INT(R8))*24)

    is that it specifically converts only the portion of R8 left when whole days are removed, e.g. if R8 contains 32:15 then R8-INT(R8)= 8:15 so the above formula returns 8.25. If you want to return 32.25 just use

    =IF(R8="","",R8*24)

+ 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