Tracker
HOME    TRACKER    Excel

# Calculate Start/End Times

## Trying to get times worked in hours and mins, from a given start time to a given finished time. I would like H18 to read 14 and H19 to read 13.5 and so on, H23 and H24 are full 24 hour coverage, but i get a 0, when using 08:00 - 08:00 as we only deal with a full or half hours, the figures should read whole numbers or half number as in th example above. Also would like to total all hours worked in H28 to 117 as opposed to the figure given in the attached file. DAY / DATESTARTENDHOURS MON22-May200618:008:00 AM14:00 TUE23-May200617:006:30 AM13:30 WED24-May200617:307:30 AM14:00 THU25-May200618:007:30 AM13:30 FRI26-May200618:008:00 AM14:00 SAT27-May20068:008:00 AM0:00 SUN28-May20068:008:00 AM0:00 TOTAL2.875 Couldnt upload the file as it was 75kbs, a

Related Forum Messages:
Calculate Hours Worked Based On 2 Start/End Times
It's been several years sine I had to look at calculating amount of time worked.
Can you please look at this old spreadsheet of mine and verify that the formula is correct?

It appears to be ok to me, but I don't want any errors when it comes to paying my employees

Formula: ...

Calculate Duration Based On Start & End Times
I have a spreadsheet with 4 columns - Start Date, Start Time, End Date and End Time. In the 5th column, I need to fill in the "Duration" which is calculated as follows :- Duration = (End Date,End Time) - (Start Date,Start Time)

Convert Start Times And End Times And Minus
I need a formula in excel to convert start times and end times and minus out lunch time taken and then give total hours worked. For instance,

Column D Column E Column F Column G
Start End Lunch Total Hours Worked
10:01AM 7:08PM 1:01 (formula to convert hours worked)

How Do You Subtract Start/end - Dates/times In Vba?
How do you subtract start/end - dates/times in vba?

I know how to do it with formulas, but can't grasp it with vba. My range will always change, so I'm trying to avoid formulas (Cutting rows etc...)

I need Col D-Col B (end date-start date) and Col E - Col C (end time - start time)

Would doing the calculation on the userform be the best way, or trying to do the calculation with the ws code?

Time Sheet :: Start / End And Difference Between Two Times
I am trying to create a time sheet where there will be a start time - end time - number of hours (difference between the 2) - pay rate - total pay, but am getting strange results!

Conditional Formatting (start And End Times Of The Shift To Turn Black Or Red)
I want the start and end times of the shift to turn black or red depending on whether the adjacent cell says "off" of "Hol" respectively. I have this working except for when I actually enter smething into these cell ie a shift, the cell turns black.

Calculate The Number Of Days From Start To End
I have 2 dates a Start Date and an End Date.
I need to calculate the number of days from Start to End over eight years with each of the eight years in its own column.

Start End Yr1 Yr2 Yr3
11/01/99 11/01/00 11/01/01
10/31/00 10/31/01 10/31/02

Col A Col B Col C Col D Col E

10/31/00 07/05/01 365 117 0

I thought a series of IF statements but I am open to an easy solution...

Calculate Hours If Both The Start And End Time Are In The Same Cell
Is it possible to calculate hours if both the start and end time are in the same cell. Unfortunatly the developers of our scheduling program developed it so when you export the schedule to excel it shows Greg in A1 and 3:00pm-9:00pm in A2. I would like to have excel calculate the 6 hours so I can use it to auto generate another spread sheet I am making.

Calculate What Months An Employee Worked By Start And End Date
I am working on a sheet that will allow a user to enter a start month (from a pre-defigned drop down list) and an end month (again from ddl). What I need to calculate is in what months the employee worked in so I can calculate their salary cost by quarter.

It can populate other cells in order to do the calculation if needed. So, for example if an employee started in May, and worked until December, I need to calculate that he worked 2 months in Q1, 3 months in Q2, 3 months in Q3, and 0 months in Q4. Our fiscal year is April to March.. ;-) I have thought of several options, but none of them have worked 100%.

Calculate End Date From Start Date & Number Of Weeks
Take a look at the attachment file. Those highlighted in yellow are entered by the user. What is the formula to calculate the End date in (A6) after the user has entered the start date (A2) & the number of weeks (A4)?

To Calculate The Difference Between The Start Time And End Time
This may be a bit vague but here goes.

I have to calculate the difference between the start time and end time of a job. The only catch is, how can I avoid calculating "out of hours" time. So, if a job goes from 9am to 9am the next day, I want it to avoid calculating between the hours of 23:30 and 03:30.

Another example is if a job goes from 02:00 to 04:00, I want it to avoid the tim between 02:00 and 03:00.

If there is a difference in days, so the job goes overnight, how do I take that into consideration also.

Formula For Start Times
id like a formula that enter "1" into a field if i start after 00:00 and before 03:59 am

so in d4 is my start time and M4 is where i want the formula to go

i tried this formula but did not work

=if(d4>="00:00",<"04:00",1,0)

Start End Date Calculation
Need a formula that will generate the ending date of task, adding therefore if needed the number of weekend(s) in between the start and end date to the End date.

Let us say: task is starting in 2008/11/11 the duration of the task is 7 days. So, we should get an End Date= 2008/11/19.

2008 11/11 11/12 11/13 11/14 11/15 11/16 11/17 11/18 11/19
Tue Wed Thu Fri Sat Sun Mon Tue Wed

Retrieve Name Between Start And End Dates
I want, based on a given date let's say 6 months ago from today (03/01/09), a formula that tells me the name of the person that finished Between the started and the GIVEN date (03/01/09). The result should be: Name2

I can also use a formula that shows, condition results such as: True..."OK", false "out of range".

Start And END Date -- Status
1. If I enter a date in B3, then D3 will be S, and if I enter date in C3, D3 will be left blank while E3 result is D (Done). To have a clear view, I have attached the excel sheet.

Difference Between Start And End Dates
I need to compute the no. of days between start and end dates and spread no. of days on each month. I've attached a spreadsheet with examples and further explanation.

Unique Start And End Dates For Chart
I have searched for a 'simple' solution to this but I only ever seem to find complex and indepth examples.

I summarise web hit information then chart it so I can look for trendlines. I get good info from the stat company so I can see where folk are coming from, search engine, weblink etc etc.

Once I have summarized it I have date running along the column headers then it is broken down through the rows so I have

Total Hits
Total Search Engine

And so on for my rows

As the days go on the data gets harder and harder to read so I was hoping I could use some kind of OFFSET function to select my data. So if my dates run from 2/11/07 to today I would like to perhaps say to Excel that I might want to see 20/11/07 to 20/12/07 in my chart.

I have plenty space to put the start and end date and I have a basic block of data.

Delete Series Through Its Start And End Number
I have different series number from column B to Q in Data Sheet, what I want is see strat and end range in temp sheet and delete(Shift xlup) numbers from Data Sheet from col a to q. If Series is like .....

Identifying Start And End Dates In A Series
i am trying to both identify the start date and the end date of a series in excel.

if you will, picture a spreadsheet with two rows with data. the top row is comprised of dates in mm/dd/yy (end of month) format. the bottom line is percentages . . . a corresponding % for each date directly above. these percentages add to 100%. in two separate formulas, I would like to identify:

1. the date in which the first %>0 occurs (start date)
2. the date in which the cumulative addition of all months %'s equate to 100% or the date in which the last %>0 occurs (end date)

keep in mind many if not most of the %'s will be 0%.

Copy Data From Start To End Range
can anyone help me how to create a macro which will copy range of data based on a criteria? I have a worksheet which contains dates on column C rows C30:C64, dates would start from march 29 to may 2. how can I copy the range of data from April 1 to April 30? the criteria which will be copied will always be the start of the of the month up to the end of the month...meaning if the dates placed is like April 26 to June 6, it would automatically extract the range for May 1 to May 31 and place this on another sheet.

Find Start & End Dates
I have a list of employees and the dates on which they were absence from work for a set period (i.e. one month). Some employees have been off for a day, some for longer. This data has been pulled from a large datasheet and now needs formatting to add in the start and end dates of absence, ready to upload to a payroll system.

The Problem:
I have been able to get a macro working on a simple list of names, however the problem arrises where I have 2 employees off on the same day - I was using a loop to find the date last used, but this no longer works.

My Request:
A copy of the worksheet in question can be found here : http://www.carpe-luna.com/other/AbsenceQueryHelp.xls

But I'll try and describe the layout as much as possible
This is how my raw data is set up. (Up to row 50 but potentially more)

A.........B...........C..............D...........E.........F
EmpNo.....EmpName.....Start Date.....End Date....NoDays....NoHours
612.......Paul........26/01/07.............................12......
612.......Paul........27/01/07.............................12......
615.......Ian.........27/01/07.............................12......
758.......Peter.......16/01/07.............................12......
758.......Peter.......17/01/07.............................12......
758.......Peter.......18/01/07.............................12......
...........................................

Task Manager Start / End Processes
code for VBA Excel that

Starts Processes

End Processes - Already got one but not that good.

View Processes

Show Start And End Of Data Ranges?
Having trouble figuring out the correct formula to show the start and end of shifts in a staff rota? Its probably really easy as it seems quite straightforward. I just cant figure it. DOH!! I have attached a short template of the problem.

Calculating Start And Finish Times For A Process
I have a number of processes that I would like to calculate the finish times of.

For example, Process A may take 18 hours to complete, Process B may take 28 hours to complete and Process C may take 125 hours to complete etc

However these processes only run during certain times, i.e. 9am to 5pm.

Ideally I would like to setup a spreadsheet that when given the start time and process time calculates the (date and) time the process will finish.

I can get it to work on a 24 hour day but I've been tearing my hair out trying to take out the none-working part of the day (the 5pm to 9am).

Return The Number Of Months There Are Between The Start And End Dates
if A1 is a start date and B1 is the end date, I want C1 to return the number of months there are between the start and end dates?

NETWORKDAYS() Function Will Return A Value Of 1 If Start And End Date Are Same
Anyone know why the NETWORKDAYS() function will return a value of 1 if the start and end date are the same? Does the function always assume that the start_date is at 12:00AM and the end_date is at 11:59PM, because it seems to also show that there are 3 days between 11/04/08 and 11/06/08.

Dynamic Range. Start & End Cell Not Known
I would like to create a dynamic range of numeric type in a single column. Only the precise position of one middle cell is known, let's say \$A\$20, but the range is supposed to extend above and below \$A\$20 and to finally include all adjunctive, positive and negative numbers in that very column.

Having read the ozgrid-resources on dynamic ranges let me experiment with the following line, however, it seems to include all entries in the column disregarding the format type or the fact that they should all be adjunctive (meaning that wherever there's a text entry it should be seen as the natural end of it): ....

Add Start/End Time/Date Into 1 Cell
When doing weekly scheduled in excell, is there a way to record a start time and an end time in the same cell and then have excell total hours scheduled from data entered into that one cell.

Use Cells For Start & End Formula Reference
I'm using this formula (in Cells D4:D10) to tabulate hours being spent on various testing activity categories (N,O,R,E,U,A,D). Is there a method I can use to permit me to change the range of cells being tabulated using Named Ranges or some sort of substitution?

= SUMIF(\$C\$15:\$C\$89,C4,OFFSET(\$C\$15:\$C\$89,0,4))

for example I would like to use the value I present in cell A2 as the starting point (for the range) & B2 as the end point (for the range) of cells being evaluated. In other words the improved formula would look like this.

=SUMIF(A2:B2,C4,OFFSET(A2:B2,0,4)) -or something like that-

See attached for reference!

Nested Loops. Start & End Loop
is there any body kind enough to look into this code and tell me from where the loop body starts and ends and which is the loop variable and how it is being incremented or decremented. i know it is a stupid question but i admit here that i learn and manage to update my sheets only because of this forum help, as i have absolutly no idea of VBA when i started some couple of months back but know i can do little bits.
thanx again for all the help i got so far and hope to get some solution this time as well

Sub LowRisk_Chart()
Clearout
Voffset = 0
Vcounter1 = 2
Vline = Sheets("ChartWork"). Cells(Vcounter1, 1)
Vblocks = Sheets("ChartWork").Cells(Vcounter1, 4)
Vstdman = Sheets("ChartWork").Cells(Vcounter1, 5)
Vlength = Vblocks

Vba Dynamic Column With Start & End Parameters
I have a sheet of data from a SQL server in Sheet1 that will be updated periodically. The data is basically structured in a date (column A), and value (column B) format.

I'm trying to create some graph functionality so that it would be possible to graph desired ranges of the data by only entering start and end dates.

That is, in Sheet 2, I enter, say, 12/31/1990 in A1, and 12/10/2006, in A2, and a column is created in SHEET3 that represents this data. The request is similar to 'datebetween' in a pivot table. It would be ok if the data created is a pivot table, however, I've struggled to find a way to do this. It seems that any range you name cannot use variables.

If this question is misleading, I'm trying to use the code
Sheet2.Range("A1:A10").CopySheet1.Range("A2")

However, I want "A1:A10" to be variables. Something like:

Sheet1.Range("Range("F6").Value:Range("F9").Value").Copy Sheet2.Range("A2")***Note: this doesn't work b/c of range object.

Updating Cells Q1 And R1 With Start And End Dates Selected In A Userform
I need some assistance taking dates entered in a userform and applying them to the sheet 'Completed_Report' cells Q1 and R1. The userform code that stores the input values is:

Return Months Between Start Date & End Dates
I have been trying to search for either a function or VBA that will perform the following:

If I enter I want all months >=1/1/07 and <=3/31/07 it would tell me that the months in between are January, February and March and so on with all dates.

Set ConnectorFormat Start & End To Selected Shape
I have two Textboxes created from the drawing toolbar, named "FlowChart1", "FlowChart2". Below is a simple macro I recorded and modified which connects these two textboxes.

Sub FlowChartConnection()
ActiveSheet.Shapes.Range( Array("FlowChart1", "FlowChart2")).Select
257.25).Select
Selection.ShapeRange.ConnectorFormat.BeginConnect ActiveSheet.Shapes( _
"FlowChart1"), 3
Selection.ShapeRange.ConnectorFormat.EndConnect ActiveSheet.Shapes("FlowChart2" _
), 1
End Sub

Although it works fine... A problem I am having is that I am working with multiple (duplicated) flowcharts. Currently, the connection is based on the name of the objects. If I duplicate both textboxes and run the macro, the connection will connect to the first set of ( already connected) textboxes.

Q. Is it possible to form a connection based on active selection rather than the name of the objects? ie: if any two textboxes are selected.. connect these two objects.

Number Of Working Hours Between 2 Dates Including Start And Finish Times
I have 2 dates+ times.

1 the contract start date and time.

2 the contract end date and time.

Can I calculate the number of working hours between these two using a formula?
So if I have a 10 hour working day (08:00-18:00), Mon-Fri and the two Dates/Times can I calculate the number of working hours?

Example
Start 06-Mar-07 10:00
End 14-Mar-07 14:00

This is 2 part days and over a weekend.

IF/VLOOKUP (set Up A Spreadsheet Which Automatically Calculates The Start And End Dates Of Project Tasks)
I am trying to set up a spreadsheet which automatically calculates the start and end dates of project tasks, by looking at the order in which tasks need to be completed. I have attached a spreadsheet to show what I am trying to do.

Calculate To Percentage Reached, Then Start Over
I have a column that is a percentage(p%) which measures the fullness of the location(loc) that the item(ite) is in, which also has a corresponding location(loc) and item column(ite).

What I need to do is add as many items(ite) to one location(loc) as possible without exceeding 100%(p%), however if the value exceeds 100%(p%) then we need to start all over in a new location. The end result would be an unknown amount of unused locations.

If p% < 100 then add the next row's p% value, else start over with a new location. I am trying to add as many items to one location as possible, and once a location fills up, we will use the next one.

WORKDAY Function To Calculate The Start Date
As everyone realizes that WORKDAY function can return a working date that exclude weekends and any dates identified as holidays. However, what if I want to return a working date excluding my designated holidays but including weekends?

For example,

Holidays are 1 Jun 2009, 2 Jun 2009 and 4 Jun 2009

Start Date: ???
Finish Date: 8 Jun 2009
Duration: 5 days

The Start Date should be 30 May 2009.

Seems like I am not able to use WORKDAY function to calculate the start date.

Calculate Weekly Sales With A Midweek Start
I'm trying to create a simple sales report. No VBA code, only excel formulas.
I'm stuck on trying to calculate the weekly sales. I want excel to be able to recognize the day of the week and know that the month started mid week.

Ex. If the 1st of the month started on a Wednesday, it adds all the sales from Wednesday to Saturday only and
if the month ends on a Tuesday, it will calculate the sales from Sunday to Tuesday only.
I want it done automatically.

I've included a zipped excel sheet example of the worksheet for a visual example.

Calculate Holidays Remaing Based On Start Date
I want to create a formula that will do the following Each worker is entitled to 21 days holiday per year this will run from 8 Jan 08 to 7 Jan 09. But if a worker starts say 15 Apr 08 he would be entitled to less than 21 days. I would just like to be able to put his start date in a cell and then automatically generate how many days holiday he would be entitled to from 15 Apr to 7 Jan.

How To Calculate Future Dates From Start Date On A Monthly Cycle
I'm trying to combine monthly calculations with "today" and with "workdays"

Example:

start date = 01/01/2009

today's date 09/16/2009

formula result = 10/01/2009 ; or if 10/01/2009 is a Sunday, result = 09/29/2009 (not 02/01/2009, 03/01/2009, etc)

=edate gives me a month but it doesn't skip weekends or calculate beyond today's date

Vbcodes To Select Start Date Then Begins Highlight Until End Date
i need VB to select the start date of booking and autohighlights the "blank booking slot cells" until the end date that is input in Excel. You can visualise this as a room booking system. The left most column is the dates and the first row represents the different rooms type. E.g. if one guest books the Twin Deluxe No. 123 room on 23 Oct 2006 until 25 Oct 2006. We wish the VB can essentially help us identify the start date then begins highlighting the three slots for 23, 24 and 25 Oct on the column for the Twin Deluxe Room 123.

Dates And Times To Calculate Together
I seem to have the worst luck when it comes to getting dates and times to calculate together. My logic just seems to go straight out the window.

What I am trying to do, the end result, is get a Time Worked (duration) that I have spent on a ticket, and a Total Time, the time a ticket was opened, to the time it was closed.

I guess we can try to do this one step at a time.

The first thing that I would like to know is if there is a way to calculate Date/Time in a MM/DD/YYYY, H:MM format?

IE:
Ticket Opened ...................Ticket Closed
5/16/2008 2:54 PM..............5/19/2008 10:47 AM
Total Time in Days / Hours / Minutes

Right now I have the Date and Time split into separate cells, simply because I couldnt figure out a way to subtract the combined date and time.

Calculate Turn Around Times
I need to calculate turn around time between two sets of data reflecting both a starting date and time and obviously an ending date and time. This should reflect work hours meaning a day that starts at 08:00 and end at 16:30.

That would be a start and would be great if someone can show me how to calculate this.

But obviously people don't work on Sundays and only work from 08:00 to 12:00 on Saturdays... Can't even imagine how one would take this into account.

Highlight-Select Start Date To End Date
We are doing a project on a booking system and wish to use VB codes to autohighlight the slots from the start date until the end date.

Find Start Date And End Date In Range
This is a sub that uses the Find method to find a series of dates and copy them to another worksheet. The following error comes up: Object variable or With block variable not set. I have tried using a set command etc. but other errors end up coming up.

Private Sub CommandButton7_Click()

On Error Goto errorHandler
Dim startDate As String
Dim stopDate As String
Dim startRow As Integer
Dim stopRow As Integer
startDate = InputBox("Enter the Start Date: (mm/dd/yy)")
If startDate = "" Then End
stopDate = InputBox("Enter the Stop Date: (mm/dd/yy)")
If stopDate = "" Then End
'startDate = Format(startDate, "mm/??/yy")
'stopDate = Format(stopDate, "mm/??/yy")
startRow = Me.Columns("A").Find(startDate, _
LookIn:=xlValues, lookat:=xlWhole).Row
stopRow = Me.Columns("A").Find(stopDate, _
LookIn:=xlValues, lookat:=xlWhole).Row
Me. Range("A" & startRow & ":A" & stopRow).Copy _
Destination:=Worksheets("Report").Range("A1")
End

errorHandler:
MsgBox "There has been an error: " & Error() & Chr(13) _
& "Ending Sub.......Please try again", 48

End Sub

Copy Range From Start Time To End Time
I want to copy and paste a PARTICULAR RANGE from one workbook to another workbook. I want to select the data range from "09:55:00" to "10:00:00" which is in the cells in Column "A" an copy paste it to another workbook. The rows are not constant. The data "09:55:00" to "10:00:00" can e present on any row but is present on the same column i.e "A".

Sum Between Start Date & End Date
I have a small business and I keep track of all my expenditure. It is not big enough to use any Accounting software yet so I am hoping to write some macros to help speed up my time doing this. I list all my expenditure on a tab called <Daily> in the format below

Date DescriptionTo £

05/10/2006Expenses Company 6.00
07/10/2006Travel costs x 658.00
03/10/2006Stationery y 2.00
04/10/2006Other Expenditure z 365.00

(i.e. 4 columns : date, description, to, £)

What I would like to do is be able to sum all these entries on a weekly basis in another tab I have already created. So for example, I would like to be able to tell the macro what range to look at (i.e. one week) then for it to look up the description and then take the sum of these totals and paste the value on a new tab.

Determine If Time Between Start & End Time
I'm not getting that early in the morning

In A1 I've the start time
In B1 I've the end time

in C2 I have a time value ie 6:30 AM

I need a formula IF C1 is between the start time and end time to return the value 1 and if not to return 0

Calculate Future Dates From Start Date With Varying Time Period/cycle
I need to determine a formula which will allow me to calculate a future date based upon a current date with varying time periods.

For example:

I have a bill which is paid on the 15th and last business day of each month. I would like to be able to see the next due date regardless of what day of the week it is.

I have a bill which is paid every other Tuesday. I would like to know the next due date without having to enter +14 for every due date in the future. In other words, it is preferable to be able to open the spreadsheet and automatically see the next due date, not use autofill to repeatedly add +14 to a previous date which would limit the # of future due dates that could be calculated.

I have a bill which is paid on the last business day of each month, not the last Friday of each month. I would need excel to return a value for the last day of the month which = Monday-Friday, regardless of what day of the week it may be as long as it isn't Saturday or Sunday(holiday exclusion would be nice but not required).