Excel Formula / VBA Code For Time Calculation

Aug 14, 2012

I am calculating the employees time and need the time spent to be categorized as follows

Monday to Friday
06:00 to 09:00 is OT
09:00 to 17:00 is BASIC
17:00 to 00:00 is OT
00:00 to 06:00 is PREMIUM

A2 =Date= 31-07-12
B2 =Start Time = 03:00
C2 = End Time = 23:00
D2 = c2-b2 = 20 hours formatted as [h]

there are situations when end date and time is the next day

E2 = 8 hours
F2 = 10 hours
G2 = 3 hours

Saturday
07:00 to midnight is OT
Midnight to 07:00 is premium

Sunday
all the time is premium

View 1 Replies


ADVERTISEMENT

Calculation Of Time Formula

Jul 14, 2009

I am trying to calculate the response time between when a phone call comes into my workplace and when the responder calls back...I have created a formula that does this using the times and dates of when the calls were recieved and went back out. This works except when the call comes in on one day and goes back later in the day the next day, making the response time larger than 24 hours. I also have it set up to eliminate 15 and a half hours from the calculation because our place of business is not open during this time. Further details....

The formula currently being used is... =IF(G50=E50, H50-F50+(H50

View 9 Replies View Related

Time Calculation Formula

May 11, 2007

I have attached a time card that needs a formula to calculate the time for the high lighted areas.

In+out-in+out= total hours.

View 4 Replies View Related

Excel 2010 :: Average Calculation For Given Date And Time Range

Jul 9, 2014

Please find the attached 2010 version excel file <For a given date Time Range average .xlsx>.

I want to calculate the average value (Column C) for the given date (Column A) and given time range (Column B).

Values to be plotted in the color cells yellow and light pink / magenta.

Voting Results.xlsx‎

View 4 Replies View Related

Date Calculation Formula - Determine Longer Period Of Time

Aug 9, 2012

How to create a formula to determine the longer period of time between two date calculations and enter the longer period of time in the cell.

My Spreadsheet:
Cell M2: Birthdate (entered in cell as 11/1/2004)
Cell J2: Last date of service (entered in cell as 10/31/2011)
Cell G2: Calculation to enter the longer period of time between (M2 (year) + 21) and (J2 (year) + 7)

Example using information from above:
2004 + 21 = 2025
2011 + 7 = 2018
2025 is the result I want added to G2

If there is any way to include the month/year in G2 that would be ideal.

View 6 Replies View Related

Excel 2003 :: Time Card / Sheet For Semi-monthly Pay Period With Overtime Calculation

Nov 19, 2012

I'm working on a dynamic payroll spreadsheet that will automatically calculate the overtime worked in a week. Right now, I'm running into a snag. My issue is with the formula in Column R. Right now, as shown below, it is doing the calculation based on regular hours minus 40 to determine the OT time. The snag is very messy and it lay in this: while the row by row calculations for total overtime worked for the week is correct, the sum at the bottom is very much off. I need an accurate method to sum the hours of overtime for the given column.

Here are the guidelines for the pay periods and overtime:

1. The pay periods for the month go from the 1st to the 15th and the 16th to EOM (End of Month). This means that the pay period could end on any given day of the week. More on this in a moment.

2. A work week is defined as Sunday to Saturday.

3. Overtime is calculated based on the rule of anything over 40 hours in a given work week.

4. Holiday hours worked do not count towards the 40 hour mark in granting overtime since Holiday pay is automatically overtime.

If it were just a matter of a bi-weekly (every 2 weeks) pay period, I would simply state =IF(weekday(DATE)=7,Hours_Worked - 40,0), and tag a SUM(range) at the bottom. Unfortunately, with it being a semi-monthly (twice a month), the end of the pay period could be a Wednesday, so a reference to day of the week won't work unless the formula can dynamically determine which set of data to evaluate.

I'm completely willing to toss out the current method of determining overtime. This is the calculations sheet that references a cleanly formatted and designed time card on a tab called "Time Card", so this isn't the full workbook. In fact, once the whole thing is done, this calculation sheet will be hidden.

Columns M and N (which are formula referenced in Column P) are basic End - Start calculations and were hidden to simplify the display as well as the number of formulas displayed.

Column L (formula referenced) is a Yes/No display for if the date in question is holiday pay.

Excel 2003
H
I
O
P
Q
R
S

1
Start Work
Time Out
Day Count

[code].....

View 3 Replies View Related

Excel 2007 :: Differences Between PEMDAS Calculation And Evaluate Formula

Apr 16, 2014

Using excel 2007 and I noticed some differences between how a caluation is done via PEMDAS (as I understand it) and evaluating vai excel.

The formula is just an example and doesnt relate to anything as such.

The formula is: 2*6+3-4/2-5+20/5*3+50

using [URL] the formula show the calculation as I would have calculated.

Manual Order.png

When using excel it does it in a different order

Excel Order.png

Any reason why?

View 1 Replies View Related

Time Calculation (Spanning Dates And Using Military Time)

Jul 15, 2014

I have 4 distinct columns.

Adm Date Adm Time Trans Date Trans Time
1/16/2014 937 1/16/2014 1045
1/1/2014 121 1/1/2014 121
1/14/2014 800 1/11/2014 735
1/30/2014 100 1/30/2014 205
1/13/2014 800 1/12/2014 1202

I would like to calculate the difference (# hours spanned from the dates shown). Unfortunately when we transfer the data the COLON is dropped from MILITARY TIME so I am having problems in the calculation. This is also made more difficult as some of the calculates span over two dates.

View 5 Replies View Related

Excel 2010 :: Update Time In A1 Timer VBA Code

Jun 2, 2014

The only change I made was to change the "Sheet1" to "Journal" to match the worksheet name in my workbook.

As you close and reopen the workbook, the timer should start with =NOW() in A1 (formatted as "HH:MM:SS") and count up with the current time until you close the workbook.

I use Excel 2010, could that be the problem, that I copied a VBA code for an older version of Excel???

Question: What exactly is a regular module, do I use Module 1 for the first portion of the code or place it in ThisWorkbook?

AUTO TIME UPDATE VBA

PLACE IN REGULAR MODULE

[Code] ....

View 7 Replies View Related

Calculation Of Time With Two Different Time Formats

Jan 30, 2007

Need a point in the right direction with this one! I want to calculate the difference between two time values, the problem is there two different formats as below:-

1) 520.00 - this is a number format

2) 500:00:00 - this is a time format HHH MM SS

What could I use to show I have a 20.00 hour difference???

View 2 Replies View Related

Excel 2010 :: Using Current Month / Date And Time In A Folder Path In VBA Code

Feb 4, 2014

I’m working on a project using Microsoft Excel 2010 and I want to add some features to facilitate saving and retrieving files process.

1.How can I save the daily created workbooks (Assume 15 files a day) in order to contain the current date (and time if possible) linked with certain cell(s) I have at my workbook forming the file name? (XYZ 2-4-2014) and/or (ABC 2-4-2014 23:11) and so on …

2.I’ve been through some other posts and I found VB code which saves the active file into specific path, but it is only useful for single workbook because multiple files are getting overwritten automatically. Is there a code which allows multiple/different files saving & creates daily folders?

View 4 Replies View Related

Hh:mm:ss Time Calculation

Nov 5, 2008

i need to total a range of cells, however, these contain time values; hh:mm:ss. it shows me the total when all cells are highlighted. but =sum() doesn't work.

View 2 Replies View Related

Calculation On Time

Mar 1, 2009

I have been burning brain cells trying to figure this out.
I get these numbers from an online source and they come in like this:

A B C D E
1/1/0912:01AM02:40AM11:18AM07:55PM

The times do not come in as times...when I format the cell to time it doesnt change...that is my first problem.

What I would need to do to these times is: take B and C and find what time is in the middle of them and put that in a different column.

This mess will also need to be plotted on a chart with time by the minute for one day as the X axis. In my example I drew lines on the chart to show what I mean....the blue lines I dont want charted...I use those to find the time in the middle.

View 12 Replies View Related

Same Time Calculation

Feb 5, 2009

I am trying to get a total column that will give the total only when two particular devices are down at the same time. This total will be taken from a long list of downtime entries for different devices but I only want the total when two particular devices are down, for example

Devicedatedowntimedateuptimetotal time
102/01/0911:00:0002/01/0911:09:0000:09:00
202/01/0911:00:0002/01/0911:04:0000:04:00
202/01/0902/01/09
103/01/0903/01/09
303/01/0903/01/09
604/01/0904/01/09
204/01/0913:09:0004/01/0913:12:0000:03:00
104/01/0913:02:0004/01/0913:15:0000:13:00
505/02/0905/02/09
total 1/200:07:00

In the example I am just wanting to work out the total time when both device 1 and 2 were down at the same time, above the total would be 7 minutes because for 4 minutes on the 2/1/9 and 3 minutes on the 4/1/9 they were down at the same time.

View 9 Replies View Related

Time Calculation ...

Jun 4, 2009

Having been looking round this site for quite some time now and always finding what I needed I am now a registered member who needs your expertise.

I have a spreadsheet for which I need to calculate hours worked depending on a few criteria.

[data] ...

The criteria is that Sat/Eve is 8pm to 6am weekdays and midnight to midnight on a saturday. Sun is midnight to midnight on a sunday, BH is a bank holiday and basic is everthing else. What I want to know is it these columns can be populated automatically using formulas.

I would really appreciate it if someone out there is up to completing this challange, as I have to manually populate this at the moment and it can be 5000+ lines long (it takes hours). If i need to change the layout it's not a problem, whatever it takes to automate it has got to be worth the effort.

View 9 Replies View Related

Time Calculation

Apr 21, 2007

I have a time card sheet that I want to make automatically calculate the time I have worked. It is set up with four columns that can't be changed. The first column is "Time In(TI)", second column "Time Out(TO)", Third column "Time Taken For Lunch(TTFL)", and Finally "Hours Worked". I have no problem getting the formula to calculate the difference in "Time In" and "Time Out" but taking the 30 minutes out of that is causing a rift. If I put the 30 minutes in 00:30:00 format it will take it but it thinks it's 12:30:00 and it displays in 00:30:00 which I want it to display 30. Just to clarify, I am using =(TI-TO)-TTFL in the Hours Worked cell.

View 3 Replies View Related

Excel Formula To Convert Time

Nov 18, 2011

I Excel formula to convert time to seconds. For example:

12:05:00 AM Expected asnwer= 300.

View 3 Replies View Related

How Do I Reduce Calculation Time

Sep 12, 2008

I am a big fan of huge files (30MB+) all interlinked with array formulas ...and lots of them. The problem is...one calculation take literally 5 hours. (I have one file I try to calculate since cca 4 hours now...it's at 63%)

I keep getting extra memory with no visible improvement on the processing time. Is there a trick out there that I can use? Something is clearly wrong.

I feel I will soon have to give up Excel, or my formulas, or my job ...

View 14 Replies View Related

Formatting With Time Calculation

Oct 15, 2009

I have a calculation whereby I use two variables which are 1. Man hours left in the week formatted as [hh] and 2. Amount of work left to do in the week formatted as 0" Man Hrs" I need to carry out a calc which says:- Man hours left in the week - Amount of work left to do in the week.

The answer should tell me if I have a deficit or surplus of hours which can then use for planning purposes. Unfortunately the problem I have is that I can't make the formatting the same for both unless someone knows of a workaround.

Man hours left in the week = 128. Man hours required to complete all work this week = 224. Therefore I need to say 128-224 = -96. However when I do this this an answer of 16 is returned.

View 5 Replies View Related

Time Calculation Between Two Cells?

Feb 14, 2014

I have attached excel sheet. Column A consists of List of LAN numbers, Column B consists of List of Documents tagged & Column C consists of time at which particular document is tagged.

I need to calculate the time taken to tag all the documents in Lan1/Lan2/Lan3 in Column D. (I can ignore the date by doing text to columns).

View 3 Replies View Related

Variable Time Calculation

Dec 12, 2007

[code] ......

=SUMIF($A:$A,">="&TODAY()-1,D:D)-SUMIF($A:$A,">"&TODAY(),D:D) calculates the total in Col D looking back from today. The results gives you 12:00. What I need is a formula that will look back from the current time to 24 hours in the past, NOT 1 day, to calculate the total in Col D. Looking back 24 hours, from 10:00am, the results would be 6:00.

Since the first time on 12/12 has not arrive, it will not calculate it, but will look back from 10:00am on 12/12 to 10:00am on 12/11 and calculate a result of 6:00 hours.

View 9 Replies View Related

Time Conversion/calculation

Mar 11, 2008

I need a formula that will calc the following: using Excel XP

#MIN.
INLUNCHOUTHRS
8:00 AM04:00 PM 8.00
8:00 AM304:30 PM 8.00
8:00 AM304:30 PM 8.00
8:00 AM304:00 PM 7.50
8:00 AM605:00 PM 8.00

View 9 Replies View Related

Time Spent Calculation

Feb 3, 2010

I need to find out the total time an issue was 'open' (not resolved) during business hours. Issues come in and resolution time is based off of a priority. Priority 1 should be resolved in one hour, Priority 2 should be resolved in 4 hours, Priority 3 should be resolved in 1 business day (8 hrs), Priority 4 should be resolved in 2 business days (16 hrs), Priority 5 should be resolved in 5 business days (40 hrs), Priority 6 should be resolved in 10 business days (80 hours).

I have start dates/times field in a column (mm/dd/yyyy hh:mm) , a resolution dates/times field in another column (mm/dd/yyyy hh:mm) and a priority in another column (1-6). I need to calculate the time an issue is in open status (not resolved) based on it's priority but I need for it to take into consideration business hours (Monday thru Friday...7 am to 7 pm)...and not calculate time outside of 'business hours'.

View 9 Replies View Related

Textbox Time Calculation

Oct 26, 2006

I'm attempting to calculate the total number of hours between a start time and end time using textboxes on a Userform.

Here is my latest attempt:

Private Sub D24_Exit(ByVal Cancel As MSForms.ReturnBoolean)
Dim myvalue As String
Dim myhour As String
Dim myminutes As String

myvalue = D24.Value

Select Case Len(D24)
Case 1
myhour = "0" & Mid(myvalue, 1, 1)
myminutes = "00"
Case 2
myhour = Mid(myvalue, 1, 2)
myminutes = "00"
Case 3

The above codes are an attempt to force an entry as time (7, 07, 700, 0700=7:00 / 13, 1300=13:00 etc.). However, the result is not correct.

For example:
Start Time in Textbox(D24)=07:00
End Time in Textbox(D25)=17:30
Result in Textbox(D27)=0.4375
Desired Result in Textbox(D27)=10.5

I've never calculated times in textboxes,

View 3 Replies View Related

Subtotals And Time Calculation

Jan 26, 2007

I am trying to calculate the time spent on each task.

I have column A with Task IDs and column B with Time. Column A could have the same task ID repeated but the column B has the time for each entry. There is only start time for each task.

Where the Task is repeated, want to know how many times the task has taken place and overall time spend on one task ID, calculating from the first entry to the last entry.

View 3 Replies View Related

Current Time Getting Changed In Excel Formula

Jul 24, 2013

In the spreadsheet attached, i have a formula now() which will update the current time in column B if i select opted from column A and similarly in column D the current time will get updated when i select option in column C.

However when i first select the option in column B the current time gets updated but after a while if i select the option in column C the time in the column B is also getting changed.

May be there is a different formula, Not sure what is the trick ?

Time sheet.xlsx

View 7 Replies View Related

How To Compute For Elapse Time Using Excel Formula

May 15, 2012

I have some question regarding elapse time using excel formula.. Just want to compute for the total hours consume by a person per task assign base on 5 days,8 hours per day working schedule(Saturday and sunday is not included since it is the restday of the agent. Working hours is 8am to 5pm. 12pm -1pm is the time agents take there lunch.

See below example and expected Result:

AGENTSStart timeEnd timeExpected Result(hour)RemarksCHARICE5/14/12 8:00 AM5/14/12 3:00 PM6.00Result subracted by 1 1hr breakALICE5/15/12 8:00 AM5/17/12 3:00 PM22.00Result subracted by 3 1hr breakJAKE5/16/12 8:00 AM5/21/12 3:00 PM30.00Result subracted by 3 1hr break(Saturday and Sunday is not included(may19-20))JOHNNY5/14/12 8:00 AM5/17/12 3:00 PM30.00Result minus 4 1hr break

View 9 Replies View Related

Time Zone Offset Calculation?

Apr 2, 2014

I've got a CSV file that has been sent to me where each entry has a vehicle reports in with certain metrics. Included in these metrics are the time the metric is reported. The problem I am having is that the time is delivered in UTC date/time (in Column A). Column B has an "offset" to show how many hours difference there are between the UTC time and the local time for that particular vehicle.

Problem 1 - My initial thought was to use "Text to Columns" with space as the delimiter, thinking I could just run a simple subtraction formula once completed. The problem here is that if an entry is recorded after 7pm local time, the UTC time moves into the next day, and the simple subtraction formula will not take that into account.

Problem 2 - Even if there was a workaround, it seems that the numbers in the "Offset" column don't work well with time calculations because they are not a time (it's -5, -6, -7, or -8).

View 4 Replies View Related

Percentage Increase Calculation With Time?

May 26, 2014

I want to calculate % increase with time related fields

Field A1 = 01:53 (formatted custom as mm:ss) happy to format some other way
Field A2 = 02:08 as above

I want to know the % increase. The correct answer is 13.27% , as 01:53 = 113 seconds and 02:08 is 128 seconds and 128/113 = 1.1327 so 13.27%

View 6 Replies View Related

Calculation Time And Charge Rates

Oct 8, 2007

I am trying to figure out a formula to figure out how much to charge for hrs of a rental. There is an automatic $1000 charge regardless of time used. the rate chart is as follows:

$1000 + hourly charge = total

=<50 hrs= $15/hr
>50hrs but <100hrs= $6.50/hr
>100hrs=$4.10/hr

ex: so is A1= 200hrs then i want B1 to equal $1820.($1000 + (200 x 4.1))=1820.

I have an idea on how to write the formula, but i am having a little bit of trouble with it.

View 14 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved