Prev: VLOOKUP with VB
Next: Conditional formating using VBA
From: SIRSTEVE on 8 Apr 2010 12:38 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.
From: joel on 8 Apr 2010 12:54 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/showthread.php?t=194050 http://www.thecodecage.com/forumz
From: fisch4bill on 8 Apr 2010 13:38 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.
From: SIRSTEVE on 8 Apr 2010 15:24 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.
|
Pages: 1 Prev: VLOOKUP with VB Next: Conditional formating using VBA |