ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Adding/Subtracting Time Help... (https://www.excelbanter.com/excel-worksheet-functions/71945-adding-subtracting-time-help.html)

killertofu

Adding/Subtracting Time Help...
 

I am trying to figure out how to subtract one time from the other to
find out the number of hours/minutes passed between times.

For example
A B
1 09:00 11:30

I would like cell C1 to tell me 2.5 hours or 2:30 (whatever format it
comes out). I will be listing a bunch of these times, so then at the
end I would also like to SUM the C column and it give me the total
hours spent. Kinda like a time log.

Thanks geniuses.


--
killertofu
------------------------------------------------------------------------
killertofu's Profile: http://www.excelforum.com/member.php...o&userid=31024
View this thread: http://www.excelforum.com/showthread...hreadid=512881


daddylonglegs

Adding/Subtracting Time Help...
 

The simple answer is

=B1-A1

format as h:mm

If you may have time periods that start before midnight and end after,
e.g. 21:00 to 06:00 then you could use

=B1-A1+(A1B1)

again format as h:mm


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=512881


killertofu

Adding/Subtracting Time Help...
 

Ok, I tried that already, but when I went to SUM all the hours up, it
gave me the wrong answer. I think it has to do with the fact that the
differences that I come up with are not the hours difference, but a
seperate time itself (ex. 8:00-10:00 is not 2:00 hours, but 02:00AM.)

Thanks for the help...sorry, I didn't mean to look like an idiot.


--
killertofu
------------------------------------------------------------------------
killertofu's Profile: http://www.excelforum.com/member.php...o&userid=31024
View this thread: http://www.excelforum.com/showthread...hreadid=512881


killertofu

Adding/Subtracting Time Help...
 

It was how I had the SUM cell formatted, I didn't allow enough hour
places, so like normal time, it was only giving me two digits.

Thanks for the help...


--
killertofu
------------------------------------------------------------------------
killertofu's Profile: http://www.excelforum.com/member.php...o&userid=31024
View this thread: http://www.excelforum.com/showthread...hreadid=512881



All times are GMT +1. The time now is 11:18 PM.

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