# How to Subtract and Display Negative Time in Excel?

Get FREE Advanced Excel Exercises with Solutions!

If you are working with the time or date format in Excel and if you subtract a time value from another, then there is a possibility that you will come across a negative time value. If the cell contains a negative time or date value then Excel might show ##### instead of the correct format of the value. In this tutorial, I will show you how to subtract and display negative times in Excel.

## How to Subtract and Display Negative Time in Excel: 3 Methods

Let’s assume a scenario where we have an Excel file that contains information about the time 6 cyclists took to complete a cycling contest. We have ranked the cyclist in ascending order from the winner of the contest to the last ranked cyclist. The worksheet has the Rank, name of the Cyclist, Finish Time, Time Difference between two successive cyclists, and the Corrected Format to show the negative time after subtraction. The image below shows the worksheet that we are going to work with. ### Method 1: Use the 1904 Date System to Subtract and Display Negative Time in Excel

We can change the default date system to the 1904 date system to display the negative time after subtraction in the correct format. Follow the below steps.

Step 1:

⦿ First, click on the File tab on the left of the Home tab. ⦿ Now, a new window will open. Click on the Options like the image below. Step 2:

⦿ Another window titled Excel Options will appear. Now, we will click on the Advanced option from the left pane. ⦿ A window with different advanced options will now appear on the right side. Now, we will scroll down that window and find out When calculating this workbook section. Then, we will check the Use 1904 date system option.

⦿ Finally, we will click on the OK button. ⦿ If we now go back to the Excel worksheet, we will see that the negative times are showing in the correct format. Read More: How to Subtract Hours from Time in Excel

### Method 2: Apply the TEXT Function in Excel to Display Negative Time in Excel

Alternatively, we can use the Excel TEXT function to display the negative time in the correct format. We have to follow the below steps.

Step 1:

⦿ First, we will write down the below formula in cell F6.

`=IF(D5-D6>=0,TEXT(D5-D6,"mm:ss"),TEXT(ABS(D5-D6),"-H::MM"))`

Formula Breakdown:

• The IF function will perform a logical test (D5-D6>=0) to find out if the subtracted time value is positive. If the logical test returns TRUE, the function will return the subtracted time value without changing anything.
• If the logical test returns FALSE, the function will first determine the absolute value of the subtracted time using the ABS function. The TEXT function will then put a negative sign (-) in front of the subtracted time value using “-H::MM” as the text format. ⦿ Now, upon pressing ENTER, we will see that the negative time in cell F6 is showing in the correct format. Step 2:

⦿ Then, we will drag the Fill Handle to apply the formula to the rest of the cells. ⦿ Finally, we will see that all the negative times in the Corrected Format column are shown in the right format. ### Method 3: Using the Combination of TEXT, MAX, and MIN Formulas to Display Negative Time

Along with the formula above, we can also the TEXT function with the MAX and MIN functions to create another formula that will also display the negative time values in the correct format.

Step 1:

⦿ First, we will write down the below formula in cell F6. The formula is,

`=TEXT(MAX(\$D\$5:\$D\$6)-MIN(\$D\$5:\$D\$6),"-H::MM")`

Formula Breakdown:

• The MAX function will determine the larger value in the absolute range \$D\$5:\$D\$6 while the MIN function will determine the smaller one in the same range.
• The smaller value in the absolute range \$D\$5:\$D\$6 will then be subtracted from the larger value in that range. So, the subtracted time value will always be positive.
• The TEXT function will then put a negative sign (-) in front of the subtracted time value using “-H::MM” as the text format. ⦿ Now, upon pressing ENTER, we will see that the negative time in cell F6 is showing in the correct format. Step 2:

⦿ Then, we will write the formula for the rest of the cells in the Corrected Format column.

Note: We can not drag the fill handle downwards as we are using the absolute reference (\$D\$5:\$D\$6) for the range in both MAX and MIN functions. So, we will have to write the formula separately for each cell in the column.

⦿ Finally, we will see that all the negative times in the Corrected Format column are shown in the right format. ## Quick Notes

🎯  The MAX and MIN functions respectively determine the largest and smallest values in a range. We are determining the larger and smaller values between only two cells. So, we have to make the cell reference absolute (\$D\$5:\$D\$6). Otherwise, both functions will throw errors as they expect the range to cover the other adjacent cells in the same column.

## What is ExcelDemy?

ExcelDemy Learn Excel & Excel Solutions Center provides free Excel tutorials, free support , online Excel training and Excel consultancy services for Excel professionals and businesses. Feel free to contact us with your Excel problems. ASM Arman

Hi there! I am ASM Arman. I Completed B.Sc. in Naval Architecture and Marine Engineering. I take a great interest in learning about new technologies and sharing my ideas and thoughts on them with others. Please do reach out to me if you have any queries or recommendations. Have a great day!!!

We will be happy to hear your thoughts Advanced Excel Exercises with Solutions PDF  