+ Reply to Thread
Results 1 to 7 of 7

Subtraction of Negative Time for Comp Hours.

  1. #1
    Registered User
    Join Date
    10-20-2020
    Location
    New Bern, NC
    MS-Off Ver
    Microsoft Office 2010
    Posts
    7

    Subtraction of Negative Time for Comp Hours.

    I've been attempting to create an excel book that keeps track of my working hours. Any time I work over 8 hours is banked as "calendar hours" that I use effectively as comp time. I have the sheet mostly worked out, except that when I take a day off I have it calculate as negative 8 hours. I then attempt to have it subtract it from my total comp time, but it gives me a #Value! Error. Any ideas?

    Thanks.

  2. #2
    Registered User
    Join Date
    10-20-2020
    Location
    New Bern, NC
    MS-Off Ver
    Microsoft Office 2010
    Posts
    7

    Re: Subtraction of Negative Time for Comp Hours.

    I've attached the workbook.
    Attached Files Attached Files
    Last edited by Ascurlock2; 10-20-2020 at 12:27 PM.

  3. #3
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: Subtraction of Negative Time for Comp Hours.

    I don't see any errors in your sheet?

  4. #4
    Registered User
    Join Date
    10-20-2020
    Location
    New Bern, NC
    MS-Off Ver
    Microsoft Office 2010
    Posts
    7

    Re: Subtraction of Negative Time for Comp Hours.

    My apologies, uploaded the wrong one. It should be the correct one now.

  5. #5
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: Subtraction of Negative Time for Comp Hours.

    In col D and subsequent, do not use the TEXT function just =C2-B2 ( and also the other columns)
    and format as h:mm

  6. #6
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,811

    Re: Subtraction of Negative Time for Comp Hours.

    You are using a TEXT() function in columns D and F, so those values are all text strings (not real date/time numbers). Excel cannot interpret the text string "-8:00" as a number so the =number+text computation in column G fails.

    I would avoid converting numbers to text using the TEXT() function. If I change columns D and F to remove the TEXT() function, then I would expect column G to execute without error.

    Column D =C2-B2
    column F =D2-E2

    You can format columns D and F to show elapsed time with number formatting (use the same number format code you are using in column G or a code like [h]:mm.

    Does that help?
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  7. #7
    Registered User
    Join Date
    10-20-2020
    Location
    New Bern, NC
    MS-Off Ver
    Microsoft Office 2010
    Posts
    7

    Re: Subtraction of Negative Time for Comp Hours.

    That was it, thank you both!!!

+ 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. [SOLVED] Display a negative time format in hours - custom tt:mm
    By annica123 in forum Excel General
    Replies: 9
    Last Post: 10-02-2019, 10:29 AM
  2. [SOLVED] Negative time, hours
    By Jacks Raven in forum Excel General
    Replies: 3
    Last Post: 07-21-2016, 10:38 AM
  3. Working with time in hours; how can i get a negative or total value?
    By smithjon in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-22-2013, 04:38 PM
  4. [SOLVED] More grief over Hours v TIME- Negative hours
    By wyndland in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-25-2013, 11:49 AM
  5. Detailed Time Sheet (overtime, comp time, vacation used)
    By Robert D. Sandersfeld in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 05-22-2006, 05:25 PM
  6. [SOLVED] how do i show negative time in hours minutes
    By john tyler in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-06-2006, 04:50 PM
  7. [SOLVED] How to show negative time (e.g. -10 hours)
    By Arhippa in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-19-2005, 05:06 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