ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Time Spent (https://www.excelbanter.com/excel-programming/441451-time-spent.html)

SIRSTEVE

Time Spent
 
I have a spread sheet that I have created that list start and end times in
them. Could you tell me how can I have my spreadsheet to calulate how much
time was spent in the total time spent collum.

Here's an example of what I'm talking about.
Date
User Name
Start Time
Finish Time
Total Time

I want to program it so that it will tell me the difference of time between
start and finish.

Thanks.

joel[_868_]

Time Spent
 

All you need to do is use a formula
=B4 - B3

then format the cell with the formula in any Time or Date format. I
usually recommend using custom format [h]:mm:ss because time formats
when over 24 hours truncates the hours to be less than 24. The custom
format showsx the hours greater than 24.


--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=194050

http://www.thecodecage.com/forumz


fisch4bill

Time Spent
 
As long as start and finish don't span midnight and are formatted as "h:mm",
a simple difference will tell you the elapsed time: in the Total Time cell
enter =B4-B3 and format as h:mm. (This formula assumes the values are in
column B; adjust to suit). If the times will ever go from one calendar day
into the next, you'll have to account for that in how you enter the start and
finish values; the formula will remain the same. In my sheet in Excel 2007, I
just entered 8:42 in B3, 9:45 in B4, and =B4-B3 in B5. The answer popped in
as 1:03 with no formatting on my part.

"SIRSTEVE" wrote:

I have a spread sheet that I have created that list start and end times in
them. Could you tell me how can I have my spreadsheet to calulate how much
time was spent in the total time spent collum.

Here's an example of what I'm talking about.
Date
User Name
Start Time
Finish Time
Total Time

I want to program it so that it will tell me the difference of time between
start and finish.

Thanks.


SIRSTEVE

Time Spent
 
Thanks you so much for your help. Your example did the trick....

"fisch4bill" wrote:

As long as start and finish don't span midnight and are formatted as "h:mm",
a simple difference will tell you the elapsed time: in the Total Time cell
enter =B4-B3 and format as h:mm. (This formula assumes the values are in
column B; adjust to suit). If the times will ever go from one calendar day
into the next, you'll have to account for that in how you enter the start and
finish values; the formula will remain the same. In my sheet in Excel 2007, I
just entered 8:42 in B3, 9:45 in B4, and =B4-B3 in B5. The answer popped in
as 1:03 with no formatting on my part.

"SIRSTEVE" wrote:

I have a spread sheet that I have created that list start and end times in
them. Could you tell me how can I have my spreadsheet to calulate how much
time was spent in the total time spent collum.

Here's an example of what I'm talking about.
Date
User Name
Start Time
Finish Time
Total Time

I want to program it so that it will tell me the difference of time between
start and finish.

Thanks.



All times are GMT +1. The time now is 04:21 AM.

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