+ Reply to Thread
Results 1 to 8 of 8

Timecard Question

  1. #1
    Registered User
    Join Date
    01-19-2016
    Location
    Ohio, USA
    MS-Off Ver
    2010
    Posts
    29

    Timecard Question

    I am trying to take the elapsed time and subtract it by an integer.. How would I go about doing that?

    Example: C5-D5-E5 = F5

    C5 = 8:00 AM (time in)
    D5 = 5:00 PM (time out)
    E5 = 1 (hour for lunch)
    F5 = 8 (total hours worked)

    Timecard.JPG

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,705

    Re: Timecard Question

    First, you want to subtract D5-C5, not C5-D5. Your formula gives a negative number, and Excel will not display negative date/time (that's why you are getting #############).

    Excel time is in units of days, so if you want to subtract an hour you either need to convert to a time value, or use 1/24.

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    or

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Expert
    Join Date
    11-27-2007
    Location
    New Jersey, USA
    MS-Off Ver
    2013
    Posts
    1,669

    Re: Timecard Question

    =(C6-B6)*24-D6

    Try This:
    HTML Code: 
    1. Click on the * Add Reputation if you think this helped you
    2. Mark your thread as SOLVED when question is resolved

    Modytrane

  4. #4
    Forum Expert
    Join Date
    11-27-2007
    Location
    New Jersey, USA
    MS-Off Ver
    2013
    Posts
    1,669

    Re: Timecard Question

    Sorry about the extra equation. pls ignore =(C6-B6)*24-D6

  5. #5
    Forum Expert
    Join Date
    11-27-2007
    Location
    New Jersey, USA
    MS-Off Ver
    2013
    Posts
    1,669

    Re: Timecard Question

    Post #2 is correct. you need to use something like:

    =(D5-C5)*24-E5

  6. #6
    Registered User
    Join Date
    01-19-2016
    Location
    Ohio, USA
    MS-Off Ver
    2010
    Posts
    29

    Re: Timecard Question

    Ok, 10-4 on the subtraction being reversed. That at least helps with the #### error.

    So, now I have 2 more issues (yay).

    C6 = 8 PM
    D6 = 4:15 PM
    E6 = .25 (15 minute lunch)
    F6 = 8:15 (it should read 8)

    2nd issue, why isn't the sum working at the bottom?

    Timecard.JPG
    Last edited by ColtsRocker1; 12-05-2019 at 11:24 AM.

  7. #7
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,705

    Re: Timecard Question

    The problem with a picture is I can't see what formula you are using. If you post any more data, please post your actual file. We can't update a picture, and not many people want to type in your data and formulas from scratch. The paper clip icon does not work for attachments. To attach a file, under the text box where you type your reply click the Go Advanced button. On the next screen scroll down and click on Manage Attachments, which will show a pop-up window to Select and Upload a file. Then close the window.

    I'm sorry, my formula was an illustration of the concept and wasn't correct for plugging into your sheet. You should really use
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    (the TIME function will not work for you, sorry)

    When adding time values, Excel will add up the result to a date/time value, which as I mentioned before is in units of days. So if your sum is more than 24 hours, and you just display the time, you just get the time portion. For example, in your data, the sum is 40 hours and 15 minutes, which is 1 day + 16 hours + 15 minutes. You just see 16:15. To see this number as a number of hours, use a Custom format for the cell of

    [h]:mm

    and you will see 40:15.

    (The other two posts also had valid formulas but they result in the number of hours rather than a time value. It all depends on what you want to do.)

  8. #8
    Registered User
    Join Date
    01-19-2016
    Location
    Ohio, USA
    MS-Off Ver
    2010
    Posts
    29

    Re: Timecard Question

    That worked.. Thank you

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Need Help With Rounding in Timecard
    By fher in forum Excel General
    Replies: 5
    Last Post: 10-16-2015, 03:46 AM
  2. Timecard formula
    By trav12d in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-04-2013, 04:41 PM
  3. timecard
    By sanjay07 in forum Excel General
    Replies: 7
    Last Post: 11-30-2009, 09:46 AM
  4. Format Timecard
    By Gnathas in forum Excel General
    Replies: 3
    Last Post: 08-18-2009, 10:23 PM
  5. Add timecard
    By cstandifird in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-31-2009, 03:08 PM
  6. [SOLVED] Timecard
    By Michaela in forum Excel General
    Replies: 6
    Last Post: 01-03-2006, 09:55 AM
  7. Spreadsheet Timecard
    By B. Baumgartner in forum Excel General
    Replies: 3
    Last Post: 07-05-2005, 09:41 AM

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