Subtracting a specific time within a formula

SandsB

Well-known Member
Joined
Feb 13, 2007
Messages
734
Office Version
  1. 365
Platform
  1. Windows
I'm using the 1904 date system and I can subtract a time value in one cell from the time value in another cell even it it results in a negative number. What I can't do is subtract a time value in one cell from a time specified in a formula like this:

=C1-02:00:00

C1 is a time in hh:mm:ss format.

Is this possible?
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Try something like this...
=C1-TIMEVALUE("02:00:00")

Or This...
=C1-TIME(2,0,0)

Or just this...
=C1-("02:00:00")
 
Upvote 0
I'm using the 1904 date system and I can subtract a time value in one cell from the time value in another cell even it it results in a negative number. What I can't do is subtract a time value in one cell from a time specified in a formula like this:

=C1-02:00:00

C1 is a time in hh:mm:ss format.

Is this possible?
Why don't you just enter the other time value in a cell?

D1 = 2:00:00

=C1-D1

Or...

=C1-TIME(2,0,0)

Assuming 02:00:00 is 2:00 AM or 2hrs 0mins.
 
Upvote 0
My guess is C1 is just text that looks like time, but Excel doesn't see it as a serial time value.

Or double check you really have the 1904 date system selected

Can you give an example of what exactly is in C1?
 
Upvote 0
What the.....?

If I use C1-("02:00:00") in one cell it works. The exact same formula pasted into another cell returns #VALUE!. I checked the cell format and both are Time values of 37:33:55. Why would the two cells produce different results?
 
Upvote 0

Forum statistics

Threads
1,224,525
Messages
6,179,319
Members
452,905
Latest member
deadwings

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top