ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Subtracting Time (https://www.excelbanter.com/excel-discussion-misc-queries/210570-subtracting-time.html)

kris

Subtracting Time
 
Here is the scenario.

If I had a cell that had 8:00 formated in time (h:mm). I wanted to subtract
1 from it to get an answer of 7:00, what would I need to do.

or lets say I had 8:00 and wanted to subtract .5, to return 7:30, what would
I need to do.

John C[_2_]

Subtracting Time
 
Time is stored as a fractional number in excel. 1 Hour = 1/24, so, if you
just wanted to be able to type a 1 or a 0.5 to subtract that from 1 actual
time to get another actual time, you would want to /24 to get it right.
A1: 8:00 AM
B1: 1 .... time to subtract, in hours
C1: =A1-B1/24
You could also use the TIME function as an alternative:
C1: =A1-TIME(B1,0,0)

Be aware, if you are just using time, and you try to subtract a time to
before midnight (i.e.: B1 above 8), then you might wanna switch to the 1904
date system to avoid the ##################### response.
--
** John C **


"Kris" wrote:

Here is the scenario.

If I had a cell that had 8:00 formated in time (h:mm). I wanted to subtract
1 from it to get an answer of 7:00, what would I need to do.

or lets say I had 8:00 and wanted to subtract .5, to return 7:30, what would
I need to do.


Sheeloo[_3_]

Subtracting Time
 
If you have the time 8:00 in A1 then use this

=A1-TIME(1,0,0) to subtract one hour...
Second parameter (first 0) represent minutes and third seconds...

=A1-TIME(0,30,0) to subtract half an hour...

"Kris" wrote:

Here is the scenario.

If I had a cell that had 8:00 formated in time (h:mm). I wanted to subtract
1 from it to get an answer of 7:00, what would I need to do.

or lets say I had 8:00 and wanted to subtract .5, to return 7:30, what would
I need to do.


Niek Otten

Subtracting Time
 
Your first post was already answered

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"Kris" wrote in message
...
Here is the scenario.

If I had a cell that had 8:00 formated in time (h:mm). I wanted to
subtract
1 from it to get an answer of 7:00, what would I need to do.

or lets say I had 8:00 and wanted to subtract .5, to return 7:30, what
would
I need to do.



muddan madhu

Subtracting Time
 
try this

start time - 8.00 AM in cell A1
end time - 5:00 PM in cell B1
Break - 1 - in cell C1

in D1 put this formula

=(B1-A1)-(C1/24)



On Nov 17, 10:13*pm, Kris wrote:
Here is the scenario.

If I had a cell that had 8:00 formated in time (h:mm). *I wanted to subtract
1 from it to get an answer of 7:00, what would I need to do.

or lets say I had 8:00 and wanted to subtract .5, to return 7:30, what would
I need to do.



John C[_2_]

Subtracting Time
 
Please remember, do not double post.
--
** John C **

"Kris" wrote:

Here is the scenario.

If I had a cell that had 8:00 formated in time (h:mm). I wanted to subtract
1 from it to get an answer of 7:00, what would I need to do.

or lets say I had 8:00 and wanted to subtract .5, to return 7:30, what would
I need to do.



All times are GMT +1. The time now is 12:22 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com