ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How do you subtract time? (ie 03:15 am minus 5 minutes) (https://www.excelbanter.com/excel-discussion-misc-queries/25607-how-do-you-subtract-time-ie-03-15-am-minus-5-minutes.html)

Dennis

How do you subtract time? (ie 03:15 am minus 5 minutes)
 
I am setting up a spreadsheet to figure on start time from the end time to
start time. I need to subtract time from the previous cell to the next cell.

Manish

Hi,
Use the article 214094 from support.microsoft.com
Also make sure that you have the cell formatting to Time 37:30:55

Manish

"Dennis" wrote:

I am setting up a spreadsheet to figure on start time from the end time to
start time. I need to subtract time from the previous cell to the next cell.


JE McGimpsey

One way:

XL stores times as fractional days, so all you need to do is subtract,
and format the resulting cell as a time:

A1: <start time
B1: <end time
C1: =B1-A1

Since times "roll over" at midnight, if your times span midnight, you
need to add 1 (for 1 day) to the "later" time. You can use XL's implicit
coercion of TRUE/FALSE to 1/0:

C1: =B1-A1 + (B1<A1)

or the more obscure, but equivalent

C1: =MOD(B1-A1,1)




In article ,
Dennis wrote:

I am setting up a spreadsheet to figure on start time from the end time to
start time. I need to subtract time from the previous cell to the next cell.



All times are GMT +1. The time now is 02:41 AM.

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