+ Reply to Thread
Results 1 to 2 of 2

Formula To Show Negative Hours On Timesheet

  1. #1
    Registered User
    Join Date
    05-27-2022
    Location
    England
    MS-Off Ver
    MS Office 365
    Posts
    18

    Question Formula To Show Negative Hours On Timesheet

    Hi.

    I've made a timesheet for myself at work. The data can be viewed by anyone so there isn't any personal information.

    At the top of the spreadsheet, you'll see I have this:

    Hours Worked: 144:00 ? Pay: ?1,454.40 ? Contract Difference: 00:00
    If I force my hours to be under my contract, it's supposed to have a "-" before the hours to indicate I am under hours. If I am over hours, it'll simply give me the hours without the "-". I used to have the "-" working when the hours were negative, but this has since stopped working. Here is my formula if anyone can help?

    ="Hours Worked: "&TEXT(SUM(F12,F22,F32,F42),"[hh]:mm")&" ? Pay: "&TEXT(SUM(G12,G22,G32,G42),"?#,###.00") &" ? Contract Difference: "&IF(SUM(F12,F22,F32,F42)<SUM(H12,H22,H32,H42),"-","")&TEXT(ABS(SUM(F12,F22,F32,F42)-SUM(B12,B22,B32,B42)),"[hh]:mm")
    Please find spreadsheet attached and thanks in advance for any help.
    Attached Files Attached Files

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,723

    Re: Formula To Show Negative Hours On Timesheet

    The items in column H are text values, and so this part of your formula:

    SUM(H12,H22,H32,H42)

    will result in zero. Thus, the comparison with the values in column F will always be false, and so you won't get to see the "-".

    Perhaps you should think about changing to the 1904-date system, where negative times are allowed.

    Hope this helps.

    Pete

+ 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. Replies: 7
    Last Post: 07-10-2018, 01:05 PM
  2. adding formula [on timesheet to show overtime hours]
    By toddp2 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 10-05-2017, 12:47 PM
  3. Need formula for calculating hours in timesheet
    By alannanoelle in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 03-25-2013, 02:02 PM
  4. Timesheet formula for calculating ordinary hours and overtime hours.
    By zoen in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-18-2011, 04:23 AM
  5. 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
  6. [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
  7. [SOLVED] How can I show hours of more than 24 & negative hours?
    By Peterlg in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-18-2005, 01:06 PM

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