Results 1 to 5 of 5

Thread: Convert hours

  1. #1
    5 Star Lounger
    Join Date
    May 2001
    Location
    Allen, Texas, USA
    Posts
    727
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Convert hours

    I have a timesheet form that I need to put in time in military time but then display as a percentage.
    For example: 9:00 to 9:55 (entered in military time) to equal 92%.

  2. #2
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,434
    Thanks
    372
    Thanked 1,457 Times in 1,326 Posts
    KzKz,

    How about: =Minute((B1-A1))/60?
    Where: A1 = start time
    B1 = end time
    Format formula cell as %
    Attached Images Attached Images
    Last edited by RetiredGeek; 2012-10-02 at 12:30.
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

  3. #3
    5 Star Lounger
    Join Date
    May 2001
    Location
    Allen, Texas, USA
    Posts
    727
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Thanks. I'm getting some strange results when it's whole hours though. Like 9:00 then 10:00, the result is zero....

  4. #4
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,434
    Thanks
    372
    Thanked 1,457 Times in 1,326 Posts
    Kzkz,

    How about: =IF(HOUR(B3-A3)<1,MINUTE(B3-A3),(HOUR(B3-A3)*60+MINUTE(B3-A3)))/60
    Attached Images Attached Images
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

  5. #5
    5 Star Lounger
    Join Date
    May 2001
    Location
    Allen, Texas, USA
    Posts
    727
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Thanks. That did the trick for that part.

Posting Permissions

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