Please Note: This article is written for users of the following Microsoft Excel versions: 97, 2000, 2002, and 2003. If you are using a later version (Excel 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Excel, click here: Displaying Negative Times.
Written by Allen Wyatt (last updated July 1, 2021)
This tip applies to Excel 97, 2000, 2002, and 2003
Mike has a worksheet that contains some times. If he subtracts 6:33 from 6:21 he noticed that he doesn't get a negative elapsed time, as in -:12. Instead he gets ############# in the cell. Mike is wondering how he can display the negative time difference properly?
The easiest way to solve this problem is to just change the date system used by the workbook. This may sound goofy, but if you use a 1900 date system (which is the default for Windows versions of Excel), then you get the ############# in the cell. If, instead, you change to the 1904 date system (which is the default for Mac versions of Excel) then you'll see the correct negative elapsed time in your formula.
To change the date system, follow these steps:
Figure 1. The Calculation tab of the Options dialog box.
If you prefer to not change the dating system used in the workbook (perhaps it may mess up some other date formulas you have in the worksheet), then the only thing you can do is to create a text-based version of the time differential using a formula such as the following:
=IF(B2-A2<0, "-" & TEXT(ABS(B2-A2),"hh:mm"), B2-A2)
If the difference between the two time values (in A2 and B2) is negative, then the formula concatenates a text value consisting of the minus sign and the absolute value of the difference between the times.
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (3514) applies to Microsoft Excel 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) here: Displaying Negative Times.
Excel Smarts for Beginners! Featuring the friendly and trusted For Dummies style, this popular guide shows beginners how to get up and running with Excel while also helping more experienced users get comfortable with the newest features. Check out Excel 2013 For Dummies today!
If you need to insert the current time, with seconds, then you'll need the macro discussed in this tip. It's easy to use ...
Discover MoreExcel has a number of functions that are available as an add-on in the Analysis ToolPak. One of these functions allows ...
Discover MoreIt can be handy to know when specific weekdays occur within a range of dates. Figuring out this information, using ...
Discover MoreFREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
2017-03-21 11:28:17
Meg
In trying to set up a chart for shift work,
A1 = the time in (i.e.,7:30)
B1 = lunch break (i.e., 1:00)
C1 = shift ends (i.e., 16:30)
D1 = total time worked is 8:00
E1 needs to indicate how many hours was overtime, if any, and
F1 needs to indicate how many hours was under worked, if any.
Please help!
Got a version of Excel that uses the menu interface (Excel 97, Excel 2000, Excel 2002, or Excel 2003)? This site is for you! If you use a later version of Excel, visit our ExcelTips site focusing on the ribbon interface.
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2024 Sharon Parq Associates, Inc.
Comments