Forum Discussion
How to display negative amount of time
Hi everyone,
I’m making a worktime sheet for my husband.
I’m not having any trouble deducting his start and stop times, but I made a column for the amount of hours he’s supposed to work, and a column for the hours he effectively worked. And if the result of this deduction is a negative number (for instance if he was supposed to work 8h but only did 7,5) Excell won’t show me the negative number... which should be -30min.
is there a solution for this problem?
thanks!
4 Replies
- SergeiBaklanDiamond Contributor
Time is always time, we can't go to the past and shift time back. It's always positive. However, you may show time difference not in terms of time, but in terms of hours or days or minutes difference between two events. Taking into account that 1 day is equal to 1, thus 1 hour is equal to 1/24, you may deduct time of event happened at 07:30 from one happened at 08:00, multiply difference on 24 and the result will be -0.5 if you apply General format to it. That means -1/2 hours difference.
Other words, =(B1-A1)*24 with applying General format to the result.
- JMB17Bronze ContributorMaybe, for the formula, you could use absolute value (ABS function), but then use conditional formatting to test if he worked less than what he was supposed to and apply a custom number format of
-h:mm
or something similar. So, the cell contents will still be positive, but the formatting will display it as negative? If you need totals, then you would have to use sumif functions to test if the actual time is <=> the expected time and net the results.
Maybe someone else will have a better suggestion. I can't say I've ever tried to work with negative time values. - NikolinoDEGold Contributor
Change the way negative numbers are displayed
Excel for Microsoft 365 Excel for Microsoft 365 for Mac Excel 2019 Excel 2016 Excel 2019 for Mac Excel 2013 Excel 2010 Excel 2007 Excel 2016 for Mac Excel for Mac 2011
Create a custom number format
I would be happy to know if I could help.
Nikolino
I know I don't know anything (Socrates)
* Kindly Mark and Vote this reply if it helps please, as it will be beneficial to more Community members reading here.