+ Reply to Thread
Results 1 to 7 of 7

"time" for a timesheet.

Hybrid View

  1. #1
    Registered User
    Join Date
    08-06-2007
    Posts
    3

    Question "time" for a timesheet.

    I'm working on a time sheet to be used by co-workers and self. In column "F" the start time is keyed in by the user, and in column "G" the stop time is entered by the user. I would like to find a formula for column "H" that would display the time for each job & time entry. Column's "F" & "G" are in 24 hr format (13:30, etc) and column "H" would need to display the time for each job in hours & tenths such as: 13:30 - 14:42 = 1.2
    I've been banging my head on this one so any help would be much appreciated! Thanks in advance for any help that can be provided.
    Steve
    Last edited by Hawker1950; 08-06-2007 at 07:46 PM.

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,887
    Hi hawker,

    You can simply use the formula:

    =(G1-F1)*24

    and format the cell as Number instead of Time.

  3. #3
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,078
    I wish I'd have read pjoaquin's reply half hour ago before I ended up with

    =INT((G1-F1)/0.041666)+((G1-F1)-INT((G1-F1)/0.041666)*0.041666)/0.041666


    :-)
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  4. #4
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,887
    No worries, Special-K.. we've all been there. I've written UDF's not realizing there's a perfectly simple worksheet function already available.

    Fortunately there are many ways to do things in Excel. Unfortunately there are many ways to do things in Excel, too.

  5. #5
    Registered User
    Join Date
    08-06-2007
    Posts
    3
    pjoaquin (Paul)

    Thank you for that formula help, it works great. I would have sworn I tried one very close to that, but evidently not! One quick question in regards to the formula though. When I enter a time in column "F" (17:30 for instance) and before I enter a time into column "G", column "H" which contains the formula will display -17:30 until a time is entered into column "G". Is there a way I can keep anything from being displayed in "H" till the end time is entered into "G"?

    Thanks again so much for your help! Formulas are my weak link! Thanks to you too Special-K, I tried your formula also, but gotta say pjoaquin's was pretty much right on to what I'm needing! Not to worry, I'll end up having lots more questions in the future and requests for help!
    Steve

  6. #6
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,887
    To keep column H blank until G is filled in, use:

    =IF(G1="","",(G1-F1)*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