Calculating Time in Excel

Calculating time in Excel can be very frustrating, especially when all you want to do is sum a column of times to get the total, but for some reason you end up with a random number like in the example below.

Let me explain what’s going on and how to calculate time in Excel.

Since time is a concept rather than a mathematical equation, Excel has come up with systems for handling dates and times whereby they are given a numerical value.

Dates in Excel

1st January 1900 has a numeric value of 1, 2nd January 1900 has a numeric value of 2 and so on... These are called ‘serial values’, and they enable the use of dates in calculations.

Times in Excel

Times are seen as decimal fractions. 1 being the time for 24:00 or 0:00. 12:00 has a value of 0.50 because it is half of 24 hours, or the whole number 1, and so on.

To see Excel's value for a date or time, simply format the cell as general.

For example the date and time of 1st January 2012 10:00:00 AM has a true value of 40909.4166666667

40909 being the serial value representing the date 1st January 2012, and .4166666667 being the decimal value for the time 10.00AM and 00 seconds.

Although the above is important to know, thankfully Excel has built in formatting so that we don’t have to enter our dates and times in serial or decimal values.

However it’s the lack of understanding of these serial and decimal values for time that cause common errors when performing calculations on time.

The Secret to Calculating Time in Excel

If you want to sum time (as in my example above) you need a custom format that uses [ square brackets ] around the hours. Like this:

You can see in the Sample box the correct total appears. This way I know I’ve formatted my time correctly.

These square brackets instruct Excel to add the hours. Without them it will reset the sum to zero every time it gets to 24 hours.

There’s no need to modify the formatting of the minutes with square brackets as they automatically add up.

Note: in some versions of Excel when you insert a formula it will automatically apply the correct formatting to give you the total. Just be sure to check the total is reasonable or check the formatting is as stated above.

This square bracket time formatting requirement also applies when using other operators like +/-.

What if you want to sum seconds to find out the total seconds?

While this isn’t the wrong answer, I want to know the total number of seconds, not how many minutes and seconds there are. To do this you’d need a custom number format like this:

You can see from the sample box I now get 237 seconds, instead of 3 minutes 57 seconds.

This can also be applied to minutes or hours. Just change the formatting to [mm] or [h] respectively.

Time x rate to calculate wages or charge out fees

I quite often want to calculate wages or a charge out fee. But if you don’t know this trick you’ll be tearing your hair out...and probably revert to using fractions like 7.50 for 7 hours 30 minutes, just so you can get the answer you expect.

While entering halves or quarters of an hour as fractions is fine as, it becomes a hassle when your billing increments come down to 10 minutes or any other fraction you can’t calculate in your head....unless you’re superhuman!

Thankfully the solution is simple. Just multiply by 24 like I have in the example below.

Timesheets to Calculate Time Worked

Below is a fairly basic timesheet layout. You can see in the formula bar that the time calculation is performed as a simple equation =I4-I2-I3.

Rows 2 and 4 are formatted with h:mm AM/PM. The employee has to type in their time as you see it in the cell for the formatting to work correctly. The advantage to this is they don’t need to convert their finish time to a 24 hour clock style. The disadvantage is a bit more typing with the need for the AM or PM distinction. Swings and roundabouts.

Rows 3 is formatted with h:mm "h:mm". This adds the text h:mm to the end of the value for presentation purposes. The employee only needs to type in 0:30 for a half hour lunch break, and Excel will add the h:mm to the end.

Row 5 is formatted with [h]:mm "h:mm" to ensure the hours are added correctly.

You can then calculate wages using the total figure in cell N5 with the Time x Rate formula above. Of course this doesn’t take into account overtime and penalty rates. That lesson is for another day.

Calculating Time that Spans 2 Days

When your start and finish times are on different dates, as in the case of shift workers, you either need to enter the Date and Time in your timesheets, or if you only enter the time then you need a clever formula to detect this. In the example below the finish time for Monday is actually 7AM on Tuesday.

Here we can use a clever trick to test for time that finishes on a different date by checking whether the finish time is less than the start time, as is the case for Monday and Tuesday above.

Taking the formula in cell G4:

The first part of the formula takes the finish time less the start time and then checks whether the finish time is less than the start time (E4<B4). In the case of Monday (E4<B4) evaluates to TRUE, and since TRUE = 1 it adds 1 to E4-B4 to correctly calculate the time.

Alternatively you could use a MOD formula in cell G4, like this:

=(MOD(E4-B4,1)-MOD(D4-C4,1))*24

The MOD function returns the remainder after a number is divided by a divisor. The formula is clever because it handles negative times, which usually return pound errors, by converting them to the balance of a day (hence the 1 in the formula). This returns the same result as the first formula [ =(E4-B4+(E4<B4)-(D4-C4+(D4<C4)))*24 ] above.

While I think the MOD function example above is super clever, it's much more difficult to explain, and more difficult to understand for those who might later inherit your spreadsheet. Feel free to use the formula you're most comfortable with, as they both return the same result.

Note: if your times are entered with the date and time you can simply subtract one from the other, it’s only in the case where times are entered on their own that you need to test whether the finish time is < the start time.

Do you need help with a time calculation? Post your question on our Excel Forum and we'll be happy to help you.

Comments

Hi, I need to work out a timetable for an event. I need to work out if i have 4 lines in each competiton and each line will take 1.30 mins how long each dance will take.

so I have dance 1 grade 1 – 10 lines of dancers and each line will take 1.30 mins (1 minute and 30 seconds). thats 15 mins for this dance. i have 156 dances with numerous line numbers all at 1 minute and 30 seconds to complete. It here a formual that will allow me to multipul the number of lines by 1.30 mins to give a total time of hours:mins:seconds?

Thanks for your question. It’s a bit difficult to visualise the layout of your data in order to give you a solution. Please post your question and your Excel sample file on our Excel Forum where we can help you further.

Similar to your formula to calculate charge out fees, I am looking for a solution for the following problem:

We charge our client in 6 minutes increments. 1 minute still has to be charged as 6 minutes. In my time sheet, the time worked appears either as the time worked (5:12) or the number of minutes (312). The result I am looking for is the number oh hours I have to bill, so 1 hour is 1 and 6 minutes is 0,1. In this example, the result should be 5,2. If I had worked one more minute, the result should be 5,3.

Hi Carol,
It’s important how you organize data, for that, we have to know all the details. You are saying that you leave work and come back to continue. Are you doing that only once a day, or can this happen multiple times?
If the lunch time is always 30 min, we can ignore it and consider the working time as 8:45 hours, not 9:15 hours (7 AM to 16:15 PM). If you come back at 14 PM, does that mean that your lunch time should be excluded from your out time? Or You will take your lunch after you come back, from 14 PM to 14:30 , instead of 12 to 12:30?
Please sign-up to our forum, create a new topic and upload a sample file with a detailed example, we will gladly help you.
Catalin

no. of total hours per day
day 1 – 8:00 hours
day 2 – 8:06 hours
day 3 – 8:10 hours
day 4 – 9:00 hours
day 5 – 8:00 hours
until the month of Day 30, my question is what’s the formula to be used and how can you total no. of hours for the whole month?

Hi Riza,
Time calculations can be tricky if you don’t use the proper format. Normally, if you have dates in a column and times in the second column, a simple SUMIF or SUMIFS (if you have multiple conditions) will be enough, the cell with this formula will have to be formatted as [h]:mm, to display times above 24 hours.
If you need help in your specific case, you will have to upload a sample file with your data, so we can see what formats are you using. Use our forum, sign-up and create a new topic to upload your file, we will gladly help you.
Catalin

You can’t put that data in one cell and calculate time. Please see the post above to understand how time works in Excel. If you get stuck, please upload your Excel file and question on our Excel Forum.

CAN ME HELP ANY FOR-
i want to get formula in excel for calculating Night Duty Hours
where is Night Duty Starts from 22:00 PM to 06:00 AM
like duty start time is 20:30 and duty end time 04:45,
duty start time is 22:30 and duty end time 06:45,
duty start time is 21:30 and duty end time 07:30,

The result is a text, you will not be able to make other calculations on the result.
If you need he result for calculations, you can format the result as number (cannot be formatted as time, negative times cannot be displayed)

I’m just trying to subtract basic hourly numbers. It seems it should be simple, but I cannot get the right output. Basically I have 40 hours of leave to start with. As time goes, I would like to subtract 15 minutes and get an output that I have 39:45 (39 hours and 45 minutes) left. Clearly I’m doing something wrong, what is the formula?

Thank you
L.E.:
Never mind, I figured it out. I didn’t realize I had to type “00:15”. I was just entering “:15” and expecting it to understand that there were zero hours and 15 minutes. Thanks!

Indeed, excel does add a zero, but only in normal cells, when you start typing the decimal separator and the decimal parts( .23). The same behavior is used by any pocket calculator, or smart phone calculator apps.
Time values are already sub-units of an integer, the same trick will not work on time format, glad to hear you figured it out!
Cheers,
Catalin

I need to repeatedly add a block of time(for example, 7 hours and 35 minutes) to an input start time, lets say 9:18 PM today(4/20) for 24 iterations and have the correct date and time(AM vs PM) for each addition.

I would like to be able to calculate a value per hour any time during the day based on real time. This is how I have set it up so far, but it isn’t working:

Start time 7:30 This is constant, formatted as [h]:mm
Current time 14:40 =NOW() formatted as h:mm (using [h]:mm causes it
to be displayed in serial format)
Elapsed Time 7:10 =SUM(B2-B1) formatted as h:mm for same reason
as above
Units Completed 3 calculated using =COUNTIF function
Units/hr ?

I would like a formula that divides the elapsed time by number of units completed each day. I have tried to divide the Elapsed time by the Units Completed, but that doesn’t work. This is beyond my knowledge level.

I would like to have an option to automatically fill tables from a cell on a particular day only.
So for example on March 3rd read content of cell D3 and put it in the table, then on March 4th read content of cell D4 and put it in the table. This table is used to make a graph that needs, day by day, to progress.So it could be something like this:

Content of the cell for March 3rd in the table cell F22:
=IF date is (2017/3/3) THEN (=D3)

Content of the cell for March 4th in the table cell F23:
=IF date is (2017/3/4) THEN (=D4)

I searched the internet (inc. this website) but could not find a way to automatically get the content of one cell by the day it currently is. I hope I made myself clear enough.

I have to Columns Column B Time 1 = 06:00 am and Colum C = 18:00 Excel converts the Time as 06:00 Am and 06:00 Pm as Format is hh: mm Am/Pm
My formula is as follows =+ (B5-C5)*24
This work perfect for night shift that is from 18:00 to 06:00 that is 12 hours
But day Shift from 06:00 to 18:00 result in -12 Hours
How can I correct this problem?

i’ve been testing with users and recording their response times during the period of an hour and a little bit after that hour. Now that I have the exact response times, I’m trying to figure out the correct formula to calculate the percentage of response times within 15 mins, 30 mins and 60 mins. Is there a simple formula in excel that can help?

I need to formulate so that if the first time is more or less than the 2nd time it will show the difference in H:MM. I have tried MOD and If formula but neither calcululate correctly over the 24hr time.

Here is my table and question:
DATE DAY time in time out time in time out day total
03/05/17 Sunday
03/06/17 Monday 7:55 AM 1:36 PM 2:07 PM 4:32 PM 8:06
03/07/17 Tuesday 7:53 AM 1:36 PM 2:05 PM 5:01 PM 8:39
03/08/17 Wednesday 7:58 AM 1:31 PM 2:06 PM 4:16 PM 7:43
03/09/17 Thursday 0:00
03/10/17 Friday 0:00
03/11/17 Saturday 0:00
Week Total 24:28 ?time left to work?
I know I work a 40 hour workweek and I want to know how many hours I have left in the week before I hit 40 hours. I would like to show the time left to work in the column .right of the calculated Week total where I showed ?time left to work?
Thank-you
Randy Brooks

Hi Randy,
The cell that holds the Day Total sum (24:28) must be formatted as [h]:mm in order to be displayed correctly. To calculated the time left, use a formula like this:
=40/24-B9 (assuming that the formula to sum all daily times is in cell B9). This cell should have the same [h]:mm format.
Catalin

Wow, this is really good stuff! I created my timesheet something like 8 years ago and I love it!

I am making a modification to test out. If I plug in my start time, lunch out and in times, I want it to tell take that information and tell me when I should expect to clock out if I want to work 9 hours. Lunch period is unpaid. I can’t seem to wrap my brain around the formula for that 9-hour clock out time.

Hi,
You can simply add the work hours to the start time, using a time conversion like this: =A1+9/24 (add 9 hours, in a 24 hours system)
To add the lunch time: =A1+9/24+C1-B1, where A1 is the start time, C1 is the lunch out time, B1 is the lunch in time. A1:C1 should be formatted as time.
Catalin

Hi,
Thank you for your feedback, glad to hear it was helpful for you.
You are always welcome to open a new topic on our forum, to solve such problems. It will not take weeks to solve a problem:)
Cheers,
Catalin

i want to know how to calculate the difference of working hours between two shift in two dates of the same person? Eg: Start time 7AM, End time 12PM (16-2-2017) and Start time 11PM (16-2-2017) End time 2AM on (17-2-2017)

Hi Anoop,
Please upload a sample file on our forum (create a new topic) to see you data formats.
I suggest using full date-time values, like 01/01/2017 4:00 PM (you can format it to display only time if you want, but it’s important to type the full date-time to avoid errors), this way you will simply need to deduct shift 1 end time from the shift 2 start time.
Catalin

Hi, your site is so helpful. I went through all the comments and tried to find a similar issue i am facing.
I tried an IF or Sumif formula.

I have the chart all set out, but wanted to deduct the time if they took a break greater than 15 minutes. If they dint take a break long than 15 mintues then i would not deduct that time. Does that make sense?

L.E.:
On my chart I have calculated the time in to work and out and also the start and end of break. I have another column that calculates the amount of time taken in break. So if that cell is more than 15 then i would want to deduct the break, if it is less than or =15 then i would not count the break in the total hours for the day.

Hi Norah,
Can you upload a sample file on our forum (create a new topic)? Time formats are tricky, I cannot see if your data is in decimal format or in time format. A sample file will answer many questions, see you on forum.
Catalin

Hi Felicity,
Try this:
Assuming that in cell C1 you have the total hours worked, use:
=2*1.5*StandardRate+(C1-2)*2*StandardRate
Replace StandardRate with the corresponding value.
If this is not what you wanted, feel free to upload a sample file with details on our forum.
Catalin

I work on time sheets that result in military time, let’s say…Monday – Friday = 40 hours in military time, but if I add the times by calculate it equals to 39.99 hrs. I understand there is no .99 in military time so it rounds off. Is there a way to make the regular breakdown equal to the military time in the format?

Hi Aizat,
If cell A1 is 31/01/2017 08:00 AM and cell B1 is 03/02/2017 03:21 PM, then all you have to do is to deduct A1 from B1: =B1-A1. The cell where you put this formula must have this custom format: [h]:mm, the result is 79:14 (79 hours and 14 minutes is the difference)

ITS NOT WORKING I’M DOING SOMETHING SIMILAR TO THE WAGES SHEET ONLY IM CALCULATING OVERTIME BUT EVEN THOUGH I FOLLOWED THE SAME FORMULA BUT IM USING TWO DIFFERENT TIME SETS SO I USED THE FORMULA “=(C4-B4)-(C5-B5)” C4:B4 BEING THE ROSTER HOURS AND C5:B5 BEING THE ACTUAL TOTAL HOURS WORKED AND THE FORMULA YEILDS ###### ESPECIALLY WHEN THE TOTAL HOURS WORKED EXCEED 12:00AM HOW CAN I FIX THIS PROBLEM

I have schedule my some trips with 10:00 minutes of travel time when in actually it took 13:28 (thirteen minutes and 28 seconds) I am looking for a formula to difference between my scheduled and actual travel time in minutes.

Hi Charylene,
If your data is properly formatted (mm:ss), and you type 00:10:00 in cell A1 and 00:13:28 in cell B1, the difference is simply =B1-A1.
Can there be actual times lower than the estimated time?
Catalin

I would like to know the formula for a time sheet an employee worked.
Is it possible to auto-calculate from a paste-source for a specific time an employee worked?
From 08:00 to 12:00 then the employee time out for lunch then time in at the afternoon at 13:00 and 17:00.. and deduct time worked from the time if 8:07, minus 7 minutes.

Hi Jat,
All you have to do is to deduct the start time from the end time, then deduct an hour for the lunch break:
=B1-A1-1/24 (assuming that you enter data in time format, not decimal format)
If you have 4 times, start 1, end 1 (before break), start 2(when the lunch time ends), end 2, use: =End1-Start1+End2-Start2
If that’s not what you want, please prepare a sample file and upload it to our forum. (create a new topic)

Hi Anupam,
If 11:30 PM time is in cell A1, and 7:30 AM is in cell B1, then use this formula:
=IF(B1-A1<0,B1-A1+1,B1-A1)*24
Always deduct the second time from the first, but add 1 to correct the errors generated when deducting times from consecutive days.
The result is in decimal system, the cell with this formula should be formatted as number, not as time. If you want the result in time format, remove the *24 from the end of the formula.

I have really liked your explanation but I have failed to connect it to the problem above, so please help me to solve it. A 24-hour-dial clock happens to gain 0.5 miutes each day. After setting the clock to the correct time at 12:00 noon, how many days must one wait until it again indicates the correct time. Please your help will be appreciated.

We have an OffTime system. Now if I know that I have arrived at let’s say 07:52 a.m. and need to work eight hours and a half on that day. How can I make the excel sheet calculate for me what time I need to leave to have finished those eight hours and a half?

I’m sure it may be in your above calculations but I’m not succeeding in my experiments.

Hi Nadja,
Please open a new ticket and upload a sample file on our Forum, it will be easier to understand your situation and help you.
There can be many time formats used, hard to tell without seeing what you are using.
Thanks for understanding
Catalin

I’ve been working within the MS suite of applications for 30 years, still finding faster, easier and more efficient ways to automate common engineering/office tasks. Your presentations prove you can still teach an old dog new tricks.
Thanks

I need a formula that will calculate the total working hours based off date and time.

Ex: I start a job on 8/3/16 at 9:00 am and it will end on 8/16/16 at 12:00 pm. I need to figure how many working hours that will be. Excluding weekends (Fri, Sat, Sun). Our working hours are 6:00 am to 6:00 pm.

Hi Daniel,
Can you please upload a sample file with a sample of your data structure?
It will be a lot easier to work on your data formats. Here is a link to our new forum, where you can start your own topic: excel-forum
Thanks for understanding,
Catalin

I would like to see if you would be able to do a worksheet where I could fill in the time (7:00 am) and what I need would appear. For example:

if something started at 7:00 am and then I needed to know the time for the next hour in 15 minute increments, what would the times be?
In this case it would be 7:00 am , 7:15 am, 7:30 am, and 7:45 am

but then I would need every 30 minutes for 4 more times for the next 2 hours
example: if the actual time continues, from above, of 7:45 am, then the next 4 hours would be 8:15 am, 8:45 am, 9:15 am, and 9:45 am

then I would need every 60 minutes for 4 more times for the next 4 hours
example: continuation from the last time which is 9:45 am
it would continue to: 10:45 am, 11:45 am, 12:45 pm, and 1:45 pm

then every 120 minutes for 4 times totaling 8 hours, then 240 minutes for 4 times totaling 16 hours then the next 41 hours to have a grand total of 72 hours

In a nutshell, I am looking to type in one time example 7:00 am and everything else to be filled out with the corresponding times but indicating am or pm

I am trying to make my own time sheet. I used to work from 7:00 am to 3:30 pm. Now I start work at 2:30 pm and end at 12:00 am. The formula I was using for the earlier times was “=sum(A16-A4)” and that of course doesn’t work anymore and I am assuming it has to do with the 12:00 am.

hi,
i would like to caculate the end time of a process based on the start time and a particular cycle?
examples:
Start time cycle End time
1:00pm quick ( end time should be auto populated based on (1:00pm + 1.30mins for cycle quick)

Hi Clay,
You can try this formula:=A2+CHOOSE(MATCH(B2,{"quick","fast","lazy"},0),1.3/24/60,2/24/60,3/24/60)
As you can see, you can add as many values you need to the lookup list. This list is written inside the formula, but you can use a lookup table, if there are too many values.
Catalin

I work multiple events that have different start times and my staff members (about 250 staff members) check in at different times before the event. (ie event start time at 5:00 pm – shift 1 would check in at 4:15 pm, shift 2 at 4:30 pm and shift 3 at 4:45 pm) Is there a formula where I can insert the start time of the event from the event information worksheet into the check in time work sheet cell where it will “subtract” time from the start time?

Hi Danielle,
Can you please prepare a sample file and upload it to our Help Desk? (create a new ticket)
This way, it will be a lot easier to understand eachother, thanks for understanding.
Cheers,
Catalin

In excel I have a start time in a1 cell as 6:00 am
and an end time of 7:00 pm in a2.
then in the a3 is then the total hours as 13:00
but when I merge this to my word doc. the 13:00 comes up as 1:00 hr. why what do I need to do to fix this on my word or my spread sheet?

Hi Vikki,
How are you “merging this on your word doc”? Using the Mail Merge wizard? Or just a copy paste in word?
If it’s the Mail Merge Wizard, you can edit the field to format it: {MERGEFIELD TimeFieldName \@ “[h]:mm”}
(to view fields, press Alt+F9)
Cheers,
Catalin

I need to know how to get my spreadsheet to read this in cell a I have a start time of 7:00 am in cell b1 I have the end time as 8:00 pm in this format h:mm AM/PM in cell c1 I need total hours between 7:00 am and 8:00 pm which is 13 hours what does cell c 1 need to be formatted ? because when I do a merge it is merging just as 1 hr anything over 12 hours it reads 1 hr for 13 2 hours for 14 help please

L.E.:
I will try that but in my spreed sheet how should the total hours be formatted?

Hi Vikki,
Can you please upload a sample file to see what you really have there?
It’s hard to understand what’s going on in that file without seeing it. You can create a new ticket on our Help Desk and upload the file, I will gladly help you 🙂
Cheers,
Catalin

Hi Deb,
I noticed that you changed the data format from your last message, the old format was better.
Type 20/08/2015 07:30 in cell A1, then type 20/08/2015 11:15 in cell B1. In cell C1, use this formula: =B1-A1. Format cell C1 as [m]. The result will be 225 (minutes)
Any other format used will need other formulas to calculate the time difference, more complex.
Cheers,
Catalin

I am looking to make a time sheet with time in & time out rounded to a plus or minus 7 minute window grace period with a 15 min round.
EX:
7:53 am to 8:07 am = 8:00 am
8:08 am to 8:22 am = 8:15 am
8:23 am to 8:37 am = 8:30 am
8:38 am to 8:52 am = 8:45 am
Also need to put into the time sheet a clock in and out for lunch that is not counted in their hours UNLESS they clock out for lunch for less than 20 minutes then they will be paid for it.The clock in and out times for lunch are not rounded times.

Ok, My employer pays its employees for all hours worked. We clock-in at 6:45 pm and clock-out at 7:00 am. Breaks and lunches paid. So, if I work 4days one week that would total 49hrs, CORRECT? Then next week will be a 3/day work week which will total, 36 hrs, 45mins, CORRECT? I’m asking this because I don’t want to be cheated out of my earnings.

I have one issue that I can’t seem to get my head around, I need to provide a weekly report of daily sheets given to me and then provide the total minutes for each start -finish in minutes, then at the end give it in hours and minutes. (I hope this makes sense)..

Date Start time Finish Time Total Minutes
24/04/2015 14:30 17:30 ?
24/04/2015 23:30 01:30 ?
etc
Then Total Minutes = Hours & Minutes (for the day/shift)
Would you be able to assist me on how to do this. (I did try the custom [mm], but seems to change the time…am/pm..
Thanks
Deb

I am trying to write a performance sheet that you can enter a number in a cell which will represent a time value. So 5 may represent 5 30 minute session, the next cell may have 3 and that would be 3 45 minute sessions. I don’t know how give the value to the cell so it can be added up for a weeks performance.

Hi Pat,
You can setup a lookup table, with 2 columns, in first column you should have 5, 3, and all other numbers, and in the next column the coresponding time durations for each number. Make sure that the values in the second column are entered using the time formula =TIME(0,5,30) for 5:30 for example
Then, in your sheet, enter the value in one cell, and in the nexxt cell you should have the following formula: =index(Tabledata[Column2],MATCH(A1,Tabledata[Column1],0))
Format the cells with this formula as hh:mm:ss, and it will display the values as you wanted.
Cheers,
Catalin

Hi,
I am trying to calculate the number of hours of employees worked where time in and time out is in text format like 7A-7P and 7P-7A. The 7P-7A is to be split into starting day hours and ending day hours.

Hi David,
Ugly format you have 🙂 , it’s not a good way to make time calculations. You should reformat the data, split it into 2 columns, reformat 7A-7P to 7:00 AM in one column and 7:00 PM in the second column, then simply deduct them (=B1-A1). If the difference is negative, you should add 12 hours to the absolute difference to get the correct result.
Cheers,
Catalin

If b2 is finish time and a2 is start time. If the amount of hours worked is over 6 hours, i want 30 minutes deducted for lunch. If it is 6 hours or under, just the actual hours worked.
why won’t this work =if(b2-a2=>06:00,sum(b2-a2-00:30))

Hi,
How is the data entered in your worksheet, is it like in your message: Tues(3/15)10:30p-7:13a?
If this is the way the data is entered, then it will be a nightmare to split those entries to recreate a time value and make the calculations.
If you are using normal date-time values in different cells, then the calculation is simple, just deduct the cells (and the lunch time for the second shift, which should be this: 0.5/24, this is the way to enter hours in time formats)
Please open a new ticket and upload a sample file on our Help Desk, with your exact data structure if you need more help on this.
Cheers,
Catalin

I need to figure out the formula that will give me 1/3 and 2/3 of a 7.5 hour day. They are bus drivers that have a midday run which is 1:15 min. They may take off 1/3 of day or 2/3 of day and I can’t seem to get a calculations.

Hi Frankie,
Can you please prepare a sample wotkbook with your data structure? It will be easier to understand your situation and to provide a personalized answer.
You can create a new ticket on our Help Desk.
Cheers,
Catalin

I am trying to figure out a formula to distinguish hours worked for military time without getting a negative answer (#####). Say the employee started at 15:00:00 on February 8, 2016 and ends at 02:00:00 (AM) February 9, 2016. I am usually pretty good at figuring things out in Excel. But I am stumped with this one. Any help would be sincerely appreciated.

Trying to set up a timesheet formula that will take the time in/out for total hours but if ½ hour lunch do not deduct the time, if more than ½ hour lunch only allow the ½ hour to be paid
Employee works 8 – 4, takes a ½ hour lunch = hours to be paid 8
Employee works 8-4, takes 1 hour lunch = hours to be paid 7.5.
Employees are allowed a ½ hour lunch period that is paid, but if they take a longer lunch, will have to work additional time to cover

A2 is Time In, B2 is Time Out, and C2 is Lunch time. All cells are formatted as time, not as normal decimal format, half hour should be typed as 00:30 in C2, not 0.5.
If you need more help, you can open a new ticket on our Help Desk, with a sample file attached, it will be easier to work with your data.
You have to decide what the result should be when there is no Lunch Time in C2, maybe there are employees on a diet :). In this case, the formula provided will result in 8:30, not only 8 hours. You can try this version, in this case, if lunch time is 0, the result will be 8:00, not 8:30:

Great work! I have been looking at several sites for something that helps me calculating work times in hours and minutes. You are the first to show how simple it is by using the correct cell format. Many thanks! 🙂

Now I trying to calculate flextime which works fine as long as it is a positive result, but when it is a negative result I get the error (#####). What cell format or formula should I use? This is my formula for flextime:
=E39-COUNT(E8:E38)*F4
where E39 is the sum of worked hours/minutes for this month and F4 is hours per day (8) and the COUNT checks how many days I have worked on this month, i.e. have data on. I use the cell format [t]:mm for all fields.

Hi Wesley,
Can you please upload a sample file with your data structure on our Help Desk? (create a new ticket). It will be easier to provide a personalized answer. There is no obvious reason for a wrong answer, it may be a data type problem.
Cheers,
Catalin

Good morning I’m trying to understand Military time. I work at Wal-Mart and I don’t understand military time at all. Thank you for your support and concern, hope that I can get the format of it. Thanks

Hi Glory,
Military times are identical to 24 hours format, not to AM/PM format. Hours are displayed from 1 to 24, 2 PM will be 1400 in military format, or 14:00 in normal 24 hours format , 4:26 PM will be 1626 (16:26 in 24 hours format)(the only difference between military and 24 hours format is that they do not use the colon to separate hours from minutes). To convert from AM/PM to 24 hours format, for example 5:10 PM, just add 12 hours to those 5 hours, and you will have 17:10 in 24 hours format (1710 in military time)
As you can see , it’s fairly simple 🙂
Cheers,
Catalin

Hi, I am trying to find a way to build a worksheet to do subtraction of hours and minutes. I have large numbers (Example 12,000:42) and want to subtract 3,724:58 from it. There are also times I will need to add similar figures. I would like to do this in excel for several reasons, for one I need to process multiple subtractions from the first number, and I would also like to be able to print the results at times. I have Excel 2013, but none of my research has led to a workable solution. Any advice you can offer would be very much appreciated.

Hi Pete,
You can easily substract 3724:58:00 from 12000:42:00, you will simply deduct the cells: =B1-A1
However, if they are not the result of a calculation, times bigger than 9999:99:99 cannot be typed directly in a cell, you have to use a trick for that:
=SUM({12000,42,0}/{24,1440,86400}). You have to edit only the first constants array, the second array represents hours per day, minutes per day (24*60) and seconds per day (24*60*60)
The result cell should be formatted as: [h]:mm:ss to display times larger than 24 hours.
Catalin

I have a raw data set that displays Name, Start Pull Time, Stop Pull Time, and Filled Time as columns. A name can appear multiple times within an hour (1st 9:00, 2nd 9:15, 3rd 9:35). I then need to look for the last filled time (say 9:50). Once that is determined, I need to subtract the last filled time from the 1st start time to determine the total amount of time the person spent working in the 9 O Clock hour. I cannot do it individually because I would be double counting time.

Basically, trying to find a formula to find/match the name, then check and see the first start time, then see the last start time for that person in that hour and subtract the last fill time.

Hi Jim,
Try this file from our OneDrive folder: Start time-last fill time
The formula used is:
=LOOKUP(2,1/($A$2:$A6=A7)*(HOUR($C$2:$C6)=HOUR(C7)),$E$2:$E6)-INDEX($C$2:$C6,MATCH(1,(HOUR($C$2:$C6)=HOUR(C7))*($A$2:$A6=A7),0))
It’s an array formula, press Ctrl+Shift +Enter to enter this formula.
Not sure if i understood right the requirements, the first part of the formula (LOOKUP) is extracting the last fill time in that hour for that person, and the second part, with index match, will extract the first start time in that hour for that person.
The formula is in F7 in the file attached.
If the last fill time is in the current row, you shoud remove the LOOKUP, and use current row:
=E7-INDEX($C$2:$C6,MATCH(1,(HOUR($C$2:$C6)=HOUR(C7))*($A$2:$A6=A7),0))
To handle situations where there are no other hours in the same hour, you will have to use the current row to calculate the time:
=E7-IFERROR(INDEX($C$2:$C6,MATCH(1,(HOUR($C$2:$C6)=HOUR(C7))*($A$2:$A6=A7),0)),C7)
Again, array formulas.
Catalin

Thank you for your help. This looks like it might help. I will continue to play around with the formula.

One last question, if i am trying to find the difference between two times but want to keep it in the answer in a general format cell how would i do that? It seems that it always wants to default back to h:mm

Hi Jim,
If you format the cell as Number, it should stay that way if you are not reediting the formula cell.
You can try also this in C1: =TEXT(your formula here,”#,##0.00000″). Keep in mind that the result of the formula is a text string, not a number, if you want to use it in other calculations.
Catalin

I am doing an electronic patient log. I am trying to use it to help me with statistical information. It is filling in other forms in real time. the patients time spent is calculated by the majority of hours spent on either an am 7A-7P shift or a pm 7P-7A shift I need to calculate the number of patients that spent the majority of time here in the am or pm

Hi Kerri,
Please prepare a sample file with your data structure and open a new ticket on Help Desk, it will be easier to help you with a personalized solution based on your layout.
As a general solution, you need a fairly simple formula to add them: =SUMPRODUCT((rng1>=7/24)*(rng2<=19/24)) , where 7/24 is the number corresponding to 7 AM and 19/24 is the number corresponding to 7 PM.
Cheers,
Catalin

I have a combobox on a form that the user can select a time in increments of 15 min. The rowsource is a simple list on an excel sheet from 12:00 pm to 12:00 am. Funny thing happens when user selects 12:00 pm on the list, the box value becomes 12:05 am. Also when the user selects 6:00 pm, the value shown in the box becomes 12:25 am. Why is this? On the combobox CHANGE event, I have a format command using h:mm. Should it be [h]:mm?

Hi Kris,
Can we take a look at your file? Looks like not the formatting is the problem, might be the calculation you are doing with those times, because 6:00 pm + any number of 15 min increments will not make 12:25, it should make 12:00, or 12:15, or 12:30.
You can upload the file on our Help Desk (open a new ticket)
Cheers,
Catalin

Calculating time where the entries are simplified with minimum typing by using the format 0\:00. The totals do not add up correctly with the same format. I have attempted all other formats available with no success. Is the a different format or a separate calculation that needs to be used? Time is of the essence (no pun intended). Please advise. Thank you!

L.E: How do I add time worked and subtract time away (lunch) when the format used is 0\:00 for input simplicity. All available format codes give wrong answers. Please advise, Thank you.

hi Mynda
i have a project for school in VBA (my vrsn in 2010)
and i’m asked to calculate the time between 2 clicks on the command button of the userform using the function Now ,then i have to place the difference of the two moments as integer in the column with this equation
time=Cint((actualtime-previoustime)*24*60*60)
the pb is that the difference is always zero even if i wait for 5 min so i can’t find how to program the now function PLUS it’s giving me overflow in the time equation
thank you in advance ^_^

Hi Imane,
An integer can hold values up to 32767, this is the source of error. If the command button is the same always, you have to store the value of the NOW function, to be able to deduct it next time you click.
You can use a tag property to store it:

if len(CommandButton1.Tag)=0 then exit sub
time=Cint((now()-val(CommandButton1.Tag))*24*60*60)
CommandButton1.Tag=Now() ‘ update the new value for the next click
Cheers,
Catalin

This will give you .31. Just remember this is a decimal representation of time. i.e. 31% of 1 second or 0.31 seconds, so if your result exceeds 1 minute then it will also be fractions of minutes. e.g. 1.5 minutes is 1 minute 30 seconds.

Basically I have entered into Column A all the lengths.
In Column B I have entered equals sign Time allowance Divided by length.
In Column C I have entered equals sign Nominated Cell multiplied by Nominated Cell.

I got another question, If I enter all my data into excel, can i set excel to do the same calculation automatically ?

Hi, I am trying to do an ongoing (more than 7 days) timesheet in Excel 2013 on Window2s 10. Hours worked formula is SUM(D3-C3)*24 which gives correct hours. I then add these summed hours in an autosum – SUM(E3:E12) which also gives the correct number of added hours. BUT when I multiply that referenced field E13 by either a number of hourly rate, or a reference to a cell with that number in it, the result is wrong by several cents (answer=$473.75). I can determine this by typing the calculated numbers into another cell as 13.54*35 which gives $473.90. Any idea what is going wrong?

Hi Johan,
If we have 28 “minutes”, this will give you the week number: =INT(28/5), and this is the day: =(28/5-INT(28/5))*5
You can replace the number 28 from the formulas with a cell reference, to make it dynamic.
Cheers,
Catalin

I am trying to write and “If” statement in excel and I am striking out.

cells column “K” I have average hours worked for my employees. 42:30:00 and 21:02:12 and 12:56:36 and so forth, straight down the column.

In column “L” I am trying to get the following “If” statement to work:
=IF(K2=>30:00:00,1,IF(K2<30:00:00,0)) Meaning if the hours in column "K" are greater
than 30 hours plug in a "1" into the cell in column "L" if the hours in column "K" are less than 30 hours then plug in a "0" into the cell in column "L"

Hi Chris,
Date and times are special in excel. The cell contains a number, which remains a number, no matter if it’s formatted to LOOK like: 30:00 or 30:00:00 or any other format.
You should refer to the value of the cell. To see the real value behind the time format, format the cell as Number, not time. Now you can use that value in your formulas. 30 hours will be : =30/24 , which is 1.25, this is the value you should use.
Cheers,
Catalin

How can you get an average of lap times. For example, I am running 8 laps of the field and time each lap. I then want to find my average lap time. I have tried the custom format but it automatically creates a clock time – AM or PM

Hi Alison,
please upload a sample file on our Help Desk, it will be easier to provide a personalized soluton for you. Normally, if you use the AVERAGE function and format the cell as hh:mm, it will be enough. If you want the result in decimal system, you have to multiply the result by 24: =AVERAGE(….)*24, with the cell formatted as General or Number.
Cheers,
Catalin

in time is 9:36:00
out time is 18:53:00
hours worked =9:17:00
required hrs =9:30:00
the diff between hrs req and hrs worked is = -0:13:00 formula used==IF(D2>E2,”+”,”-“)&TEXT(ABS(D2-E2),”h:mm:ss”)

As I want to add the diff between hrs req and hrs worked there are many records sum times the employee worked extra time den +1:14:00 is displayed and sumtyms if he worked less den -0:13:00 is displayed but as I am adding these records it shows 0:00:00
please provide solution as soon as possible

I am trying to do an automatic sprinkler schedule. I have 24 zones, Run Time, and Start time. Zone 1 starts at 6 pm and runs for 20 minutes, which makes zone 2 start at 6:20. I want the start time to change based on how many minutes I enter as Run Time. So if I typed in 25 minutes in zone 2, it would make zone 3 start time 6:45. Can’t figure out how to format so the time adds the minutes and then displays new time. Thanks for your help.

Hi Cindy,
You can use this formula: =A1+$D$1/24/60 , in D1 you should type the interval in minutes (20, or 25, or any number of minutes), in A1 is the start time for the first zone. The formula will convert the number of minutes typed in decimal system to time system.
Cheers,
Catalin

I would like to calculate the difference between total hours worked and total hours paid.
Say I have 26.10 hours worked and total hours paid was 32, the difference is coming up as 5.90 but I need it to read as 5.50. I’m new to formulas so I’ve not been able to figure this out.

When you enter time like this 26.10 Excel interprets it as a decimal. If you want 26 hours and 10 minutes then you must enter time as 26:10. Likewise for 32hours, it must be entered as 32:00. Then you can use your formula and the result will be 5:50.

Hi Amanda,
If you type 12/07/2013 7:00 in A1 and 13/07/2013 23:59 in B1, a simple operation will give you the result:
=B1-A1 will result in 40:59 , if you custom format the cell with this format: [h]:mm , or, if you want the result in decimal sistem, not in time format, use =(B1-A1)*24 this will result in 40.98333333.
Cheers,
Catalin

Hi Sean,
12:15 AM minus 10:15 PM is negative, excal cannot display negative times. To avoid this, you have to check if the result if negative and add a day:
=IF(B1-A1<0,B1-A1+1,B1-A1)*24 (the result is in decimal system, remove *24 if you want the result in time format)
Cgeers,
Catalin

Hi Rafiq,
2:00 AM minus 10:00 PM is negative, excal cannot display negative times. To avoid this, you have to check if the result if negative and add a day:
=IF(B1-A1<0,B1-A1+1,B1-A1)*24
This cell must be formatted as numeric, it will show 4 as the result. If you want the result in time format, remove that *24 that converts time format to decimal format.
Cheers,
Catalin

What formula can be used if for example. your schedule is 10:00am and you are late . your time in is 10:06am how can i get the 6 minutes late? and you need to minus that 6 minutes in 90 minutes. so became 84 minutes. what formula i will use. thank you.

Hi Leo,
Assuming that in A1 we have actual time (that 10:06), in A2 the Start Time (10:00), you can use =90-(A1-A2)*24*60 . The result will be 84, this cell must be formatted as number, not time format.
Cheers,
Catalin

I have a list of tasks with duration times. Each task must be done in order with the start time of task #2 equal to the finish time of task #1 and so on. I would like to calculate the finish times of each task in the list but take into account the work schedule. A task cannot complete outside of the standard scheduled work hours.

Hi Eric,
Without a file to see how data is organized, all i can say is that you need a formula to do that 🙂
Please upload a sample file with all the details you can give, it will be a lot eaqier to understand the situation. Use our Help Desk system.
Cheers,
Catalin

I’m having a problem.
I have a time/date in the same column
ex: “0800 26JAN2015”
I want extract the time so I can compare it to other times to get the minute difference. I first separate by “text to column” to get the time alone in a column to work with. Once I’ve done this my time comes up as 800. This is were I run into problems. I want to get it in custom format for hour and minute {t}:mm but I get 19200:00 instead of 08:00?? Can you help?

Hi Scott,
You can use a formula to extract the time, and reformat it to a time format:
=TIMEVALUE(LEFT(LEFT(A1,FIND(” “,A1)-1),2)&”:”&RIGHT(LEFT(A1,FIND(” “,A1)-1),2))
Text to columns returns a number, 800 hours, not 8 hours.
Cheers,
Catalin

Hi I am working with excel 2010.. and I am working on time logs.. I have gotten the spread sheet to do as required up to a point.. it adds the individual days hours ( 6.4.5.8.8 ok so 31 hours now I want to subtact 4 hours on the spread sheet to show final hours for the week… just cant seem to figure this out.. the 31 is formatted in hours minutes what do I format the 4 to? And the sum? Thanks bob

Hi Bob,
Please prepare a sample workbook with your calculations and details on what are you trying to do, and sent it to us using the Help Desk, it’s hard to say what’s going on without seeing the data and formats.
Thanks for understanding,
Catalin

That is great to know, since I have to do exactly that to pay someone.
It would have been nice to have the example include the pay rate and total pay.

However two minor things were left out that would have helped:
1. You have to enter the 5:30 PM time as 17:30 (24 hour clock) or else you will get 5:30 AM
2. If you compute the pay, (which is the reason for all the work above), you must multiply the hours X pay-rate X 24.

I was initiall befuddled because when I multiplied a pay rate of $9.00/hr * 8:30 h:mm on Monday, I got $3.00 instead of $72.

This formula calculates Rows 4 correctly: =((IF(C4>B4,C4,C4+1)-B4)+(IF(E4>B4,E4,E4+1)-D4))*24; but F5 and F6 both return an incorrect results when there is no in/out for lunch. What am I doing wrong? Please note: all of the formatting should be as shown above.

Hi Vanessa,
You can add a new check to your calculation, to calculate the second IF only when column E is higher than 0:

=(IF(C4>B4,C4,C4+1)-B4+IF(E4>B4,E4-D4,E4+1-D4)*(E4>0))*24

Note that *(E4>0) at the end of the second IF statement, this will multiply the IF function with 0 if column E is empty, and with 1 if there is a value higher than 0 in column E, so it will not change the result of IF calculation.
Cheers,
Catalin

Thanks Catalin. This works perfectly except where there is no in/out for lunch, or on rows (days) where there is no time entered (in which case the result should be 0, which I have conditionally formatted to have white text so the cell appears blank). The complete worksheet is below and may better explain. As you can see, Rows 4,5,7 and 8 still do not calculate properly:

I’m attempting to come up with a way to determine elapsed time between two events. The format for the start-time and end-time are in the form: ddhhmmZ MMMyy, where dd=day, hhmm are hours & minutes, ‘Z’ indicates GMT, and will appear in all time/day entries, MMM = the month abbreviated to three capital letters, and the yy = the last 2 digits of the year. The output should be in the form: ddD hhh mmm, or dd”D” hh”h” mm”m” where the “D” “h” and “m” characters appear in the output as letters, minus the “” marks.

I think I can come up with a way of doing this, but so far I’m still working on it. Unfortunately the format requirement is pretty rigid.

HI
I am calculating schedule maintenance and have worked out the hours per task, but now need to break into one working day, cannot find anything to help with this and as there is thousands of activities and does take huge amount of time to do manualy?

Hi Maureen,
Please send us a sample file with your calculations and details on what you are trying to achieve, a manual example of expected result will be very helpful for us to understand exactly what you need.
Use our Help Desk to upload the file.
Catalin

Hi Mawi,
Type in a cell 11/11/2014 03:22:00, format the next cell as [h]:mm then type 49:30 . Then, in another cell, just add those 2 cells with a simple sum: =A1+B1
The final cell should be formatted as: d/mm/yyyy h:mm AM/PM, it will show 13/11/2014 4:52 AM.
Is this what you wanted?
Cheers,
Catalin

Monday employee was late by 8 minutes (7.52)
Tuesday employee was late by 13 minutes (7.47)
Wednesday employee was on time
Thursday employee is on a rest day
Friday employee is on a rest day
Saturday employee was on time
Sunday employee was on time
Total of 38.99
I took 60 minutes away from the 99 minutes
I believe the time should convert to 39 hours and 39 minutes

Hi Robin,
Now i understand where the error comes from.
Excel works by default in decimal system. The date system used in excel is considering a day as beeing 1 unit.
The system is described in this article, right from the beginning: Times are seen as decimal fractions. 1 being the time for 24:00 or 0:00. 12:00 has a value of 0.50 because it is half of 24 hours, or the whole number 1, and so on.
There is a huge difference between 7:50 and 7.50, and this is the point where you are making a confusion between decimal system and time system.
7:50 is a time format, and means 7 hours and 50 minutes. But 7.50 is in decimal system, where integers are days, and hours are fractions of a day! 7.50 means 7 days and a half!
Considering that a day is 1 integer, and a day has 24 hours, 1 hour is equal to 1/24 days, that means that 1 hour equals to 0,041666667
days (=1/24), is that correct?
Times under 24 hours cannot be over the value for 1 day (which is 1, of course). 8 hours represents 1 third of a day, that can be written in decimal system as =1/3=0.3333 , not 8 integers! 12 hours is half a day, so it represents 0,5 units in decimal system.
You should learn these things, and you will never have problems again with times. Try this: instead of typing 8, 8, 8, 7.52, 7.47 in those 5 cells, type the values in time system: type 8:00, 8:00, 8:00, 7:52, 7:47. In the next column (considering that you typed those times in A1:A5, type in cell B1 this simple formula: =A1, and copy it down to B5. Format column A as time, and column B as number. You should have now in column B these numbers: 0.3333, 0.3333, 0.3333, 0.3278, 0.3243; in column C, type =B1*24, or =A1*24 (as those columns holds the same values, only the formatting is different); you will get: 8, 8, 8, 7.87, 7.78; the sum of these 5 values is 39.65, and this is in decimal system, if you want to convert it back to time system, divide it by 24: 39.65/24=1.652083. Format this cell as [h]:mm and you will see 39:39 for the value 1.652083, this value means 1 day and almost 2 thirds of a day.
Hope i removed some clouds 🙂
Regards,
Catalin

38.99 converts to: 38 hours and 59 minutes.
38 hours and 39 minutes coresponds to 38.66 in decimal system, and the result is very simple to evaluate, because 39 minutes represents almost 2/3 from an hour, and 0.66 is 2/3 from 1 unit in decimal system.
Can you explain why should 38.99 convert to 39 hours and 39 minutes?
Catalin

Hi Robin,
To convert 38.39 from excel’s decimal system to sexagesimal system (time is in this system), just divide by 24: =A1/24, make sure you’ve formatted the cell as [h]:mm, the result should be 38:23.
For other question, you better open a ticket on our Help Desk system, if you still need an answer.
Regards,
Catalin

Hi, you said Overtime is going to be in another lesson, did you post this already?
Here is my question. Thank of you I figured out how to sum the working hrs of the days minus the breaks.
Now, I tried to put a formula that says =IF(Cell_Total hrs>8, Cell_Total hrs-8, 0) in this case I should see the overtime (after the 8th hr) hours but it doesn’t work with the time format. If I can figure this out I’d like to change the entire sheet with a formula like this: =IF((Ending time-Starting time-Break time)>8, (Ending time-Starting time-Break time)-8,0) to be able to have two totals, the regular hrs and the overtime hrs. Am I working on the right direction?
Thank you a lot for your help!!!
Giorgio

I would like to create a time sheet that deduct lunch breaks. We work 40hrs each a week and take 1hr lunch break. My company pay for 30mins. So I would like for the hour lunch break to be deducted for 30mins so our sheets could equal 8 hours a day

Hi Monique,
Please prepare a sample file with your calculations, an example of manual calculations will be a great help to understand your situation.
Use our Help Desk to upload that file.
Thanks for understanding
Catalin

we are also restricted to working 2.5 hours either side of low tide
I want to be able enter the low tide time into a sheet that will then give us the working hours on site taking into consideration the start and end times of the working day

For instance todays low tide times are 5.40am and 6.21pm
One week from today the times are 12.03am and 12.24pm

This has a major impact on our available working times on site and being able to program resources to carry out the works

Hi Mark,
Please prepare a sample file with your calculations, an example of manual calculations will be a great help to understand your situation.
Use our Help Desk to upload that file.
Thanks for understanding
Catalin

Something like that but this (1 11:13) is on cell F2. So I’d like G2 to calculate it in days, H2 in hours and I2 in minutes.
Thank you but this didn’t seem to work. However, I might have done it incorrectly. So I’m trying to break it (1 11:13) down. I need one column with it broken down into days, one in hours and one in minutes. I put in the formula =INT(F2) and just got #VALUE and the same for the others.

I have to see the data you work on, if it’s a text string (1 11:13) and not a Date, then we have to treat it like a string, not a number.
Please use our Help Desk to upload a sample file.
Cheers,
Catalin

Hi Robyn,
this value: 1 11:13, can be split in components with simple formulas: =INT(A1) for days, =HOUR(A1) for hours and, obviously, =MINUTE(A1) for minutes.
Is this what you were trying to do?
Catalin

You don’t need to convert the value, you can just change the number format to h:mm.

1. To change the format first select the cells containing time >
2. CTRL+1 to open the Format Cells dialog box >
3. On the Number tab go to the Time group and select the format that doesn’t have AM/PM after it.

So, I have an excel spreadsheet for timekeeping that the users key in integers for their hours. Example 6.3, 5.15 or 8 for the equivilant of 6:30, 5:15, or 8:00 hours. I’ve used the custom format for [h]:mm in updating the spreadsheet and getting the total fields to calculate time correctly. Yeah. Now I’m getting flack for “making” the users type additional characters. 6:30 or 5:15, or 8:00 for each entry to meet the cell format requirements.

Is there a formula for converting entered integer data into the the time format without having to create additional fields? User keys in 8 and spreadsheet converts to 8:00 or 6.3 and converts to 6:30 (H:MM) of hours.

I have a workbook with several pages in it. Each page tracks time invested on behalf of a different client.
My summary page summarizes time invested by client and looks like this:
Client A 4 01:34
Client B 2 19:27
Client c 4 15:20
Client D 0 07:06

Hi Michael,
Can you please upload a sample of your calculations with details on what are you trying to do? It will be a lot easier to understand and work on your data structure. You can use our Help Desk
Thanks for understanding.
Catalin

I have no problem calculating day or night hours so long as they are in the same day. However, how many hours are there between 5:00 PM and 7:00 AM of the following morning? When I subtract 5:00 PM (17:00) from 7:00 AM (7:00) I get the wrong answer. From 5:00 PM to midnight is 7 hours, and from midnight to 7:00 AM is 7 hours, so the correct answer should be 14 hours. I use the formula =IF(D96>C96,D96-C96,SUM(24)-C96+D96) which gives me 14:00. However, when I then add that 14:00 to the number of hours worked so far (35:00) I get the answer 601:00, which of course is incorrect. What I have had to do, is manually change the total cell to 49:00.

Hi Dwight,
Please upload a sample file with your calculations, it will be easier to understand the situation. If you format those C96:D96 cells as numbers, not date or time format, which are the numbers shown?
You can use our Help Desk to upload a file.
Catalin

Would you teach us the trick of adding or subtracting time – such as in cell phone mapping the time of the call may be recorded in a different time zone, so we have to add or subtract an hour or two from a static time stamp, depending on daylight savings time.
Thank you!!

It sounds like you need to lookup the time zone of the static time stamp and find out how many hours need to be added/subtracted, then it’s just a case of simple maths – time stamp +/- hours to adjust.

You can use a VLOOKUP formula to locate the time zone and number of hours to adjust by.

If you get stuck it would be best to send us an example Excel file via our Help Desk so we can give you a custom solution.

I’m trying to create a formula that will allow me to take tasks that have a duration. (15 min, 30 min, 1.5 hours)
create a schedule that if I use a cell to show start of day 7:00a. I can add task and the cell that has time in will show how long it will be in time.
example
7a start of day (fixed cell with time)
7-7:30a task 1 :30 min. (7-7:30a is the calculated cell)
7:30-9:00a Task 2 (1.5 hours)

I’m not sure I fully understand your question but it sounds like the best solution is to use a VLOOKUP formula to lookup the duration of each task. You can then add the task duration to the start of the day fixed cell using a simple formula e.g.

Note: You can’t enter your start time as “7a” as this is text and Excel can’t perform math calculations on text. You must enter it as a time value i.e. literally type: 7:00 AM into your cell and press ENTER. Likewise for the task durations.

I hope that helps. If you get stuck please email us your file via our help desk so we can see what you’re working with and give you a tailored answer.

I just wanted to be able to enter a daily start time in one field and an end time in another using a 24 hour format to derive the total time (hours and tenths of a 60-minute hour). Example: Start Time 11:00 and end time 16:20; total time being 5 hours 20 minutes and the number in the cell should be 5.4 hours.

Hi Stephen,
A1: 11:00
B1: 16:20
C1: =B1-A1 , this will be 5:20 in time format (sexagesimal)
D1: =C1*24 , format as number (not time); the result will be 5.33333 (in decimal system), not 5.4, as 20 min is a third of 60 min. You can do the calculation in a single cell: =(B1-A1)*24
Hope this helps 🙂
Catalin

I have Numerous columns :
A: 07:30 B: 10:30
I then have columns to the right of this starting from (C-N)
07:30, 08:00, 08:30, 09:00,9:30, 10:00,10:30,11:00,11:30
I would like to input the A and B figure and conditional format the rest of the columns to the right to colour in the times(columns that are 07:30-10:30)

Hi Marlene,
You can try this sample file created on our OneDrive folder.
The formula is:
=AND(C$3>=$A4,C$3<=$B4)
You have to be careful when locking rows or columns (with $ sign), this is the detail that makes the conditional formatting to work (or not).
Hope it helps 🙂
Catalin

i want to charge the client the minutes i spend on a phone call
how do i get the minutes
Start time End time total minutes
7:30 am 8:30 am (entered formula: C6-B6 but it gives me 1:00, need to get the minutes….
thanks a lot!

I’ve calculated an arrive time and a depart time (hour, minute, second). e.g. Arrive time 20:20:48, Depart time 20:21:24.

When I report the time I truncate the seconds.
If the minute in the arrive time is the same minute in the depart time, I only report the departure time. The arrive time in this case is left blank in the arrive time cell.

How do I set that arrive time cell to only show when the minute is different ?

Hi Scott,
What do you mean by: “If the minute in the arrive time is the same minute in the depart time” ?
What if the hour is different, but the minute is the same? My guess is that you intended to say that the hour AND minute is the same…
Try setting a conditional format on Arrive time column (column B in this example), using a formula like this:
=AND(HOUR(A1)=HOUR(B1),MINUTE(A1)=MINUTE(B1))
Set the font color to be the same to cell color(if cell color is white, or no color, make the font white in conditional format settings)
Where this formula is true, the value will not be visible, simply because there will be no contrast between font color and cell color.
Hope this is what you need 🙂
Cheers, Catalin

Hi
I can’t figure out how to calculate Total of 1 week times time in excell formulas
to get this time i used this formula =Text(C2-C1, “h:mm”)
Mon. Tue. Wed. Thur Fri. Total
8:39 8:34 7:48 8:33 7:38 ?
Now I need a weeks total I’m not getting it!

What do I do if I have employees whose rates increase by a half on peak hours. (from 3 to 6pm and then from 8 to 10 example). All I have in terms of input is when they started to work and when they ended work. thank you

As you are a Free member you will receive our weekly newsletter with more useful tips like this. Of course you can go through the free training videos and read all our blog posts to pick up new things.

Hi Frances,
Please upload a sample of your data structure, there can be thousand templates for this type of calculations, there is no unique formula for all.
You can use our to upload a sample workbook.
Catalin

Hi,
I’m trying to build a table where the reference Times are: “In-core Hours: Start -08:00, Finishes – 16:00” and “Out-core Hours: Start – 06:30, Finishes -17:00”. Kind of overtime that can be done between 06:30 to 08:00 and 16:00 to 17:00.
Now the actual excel sheet has Start and Finishes times only for each day, Monday to Friday. Is there a formula that I can use without the need to add any more columns??

Hi i need to calculate standing times for machinery that are used on three shifts per day. when i try to calc times where the start time is greater then end time excel gives me a error how do i correct this. eg.
Start time 23:25:00 minus End time 02:30:00 Standing time:xxxxxxx I am using OFFICE 2010
Thank you

I’m trying to make a schedule. We have 3 shifts 700-1500, 1500-2300, and 2300-700. I have the time in and time out input cells formatted to 0\:00 so that I dont have to constantly enter a (:) colon for every entry. How can I add these cells up as a 0.00 format?

I do have an example of the schedule I am working on if you needed to see it for an example.

Hi. I am trying to make my spreadsheet give me total time by which a job is overdue or missed. The problem is I need to subtract the times from different days…. For example: If the job came in on 3/3 at 13:00 hrs, and it was not completed until 3/6, at 7:00 hrs, can I make the spreadsheet calculate the difference? Thank you!

Hi Chris,
I you deduct those dates, with simple calculations like : =B1-A1 , the result is 2.75 days, in decimal system. That decimal fraction of 1 day, 0.75 days, means 18 hours (0.75*24). If you multiply 2.75 to 24, you will get the total number of hours:2*24+18=66=2.75*24.
If this is not what you needed, please upload a sample workbook with your calculation and details on what are you trying to do. You can use our Help Desk system: https://www.myonlinetraininghub.com/help-desk
Cheers,
Catalin

I’ve downloaded to a spreadsheet time data from our time management web program. After downloading I wanted to sum the time entries. I’ve tried to format and sum without results. Is this something you could look at and let me know how to accomplish the task?

It may be that the data you have downloaded is formatted as text and not a number. This is a common problem when importing data from external systems. Excel cannot sum text so you will need to convert it to numbers first.

Depending on your data format you may be able to use the VALUE function to convert it. In a blank column beside the numbers you want to convert simply enter:

=VALUE(cell reference containing number formatted as text)

e.g.

=VALUE(A1)

Then copy down column. If this doesn’t work it’s best if you can send us a copy or extract of your data so we can see it and understand the problem. You can send it to us via the Help Desk.

Hi Suzie,
The formula you can use is:
=A1/(B1*24) The time is multiplied with 24 to convert the time value from sexagesimal to decimal numeral system. 166:05:39 will be 166.09 decimal hours. 486/166.09 will give you the answer…
Catalin

I work with a spreadsheet that is an agenda with start times for each segment of an event. Sometimes I need to change the start time of the event or the length or placement of a segment within the event. That then changes the start times for everything following that changed segment. I would like Excel to automatically adjust the subsequent segments’ start times.

Hi Rebecca,
Can you upload a sample workbook with your data? If you change the start date, it can be done with simple formulas, but if you change intermediary times, depending to the functionality you need, you may need a macro to do it. For now, best thing to do is to show us your data structure, with as many details you can share. You can use our Help Desk: https://www.myonlinetraininghub.com/helpdesk/
Catalin

To format the serial numbers as a dates 14/1 and 25/1 you need to format them with a custom number format:

dd/m

To do this select the cells and press CTRL+1 or right click and select Format Cells > on the Number tab under Category choose ‘Custom’ > in the Type field to the right of the categories enter dd/m and press ok.

I have a column of time each operator was logged on for the month and need to get an average for the center. How would I go about calculating the average? Thanks
Example:
54:42:15
96:27:22
133:06:21
184:34:08
157:59:58
117:24:37
136:39:18
119:31:50
151:49:40
155:26:06

I figured it out. I had imported the data from a reporting system into Excel and though I had formatted with the custom number format, when I either added the column or averaged it, it would return with 0:00:00. I found a post where you need to highlight the column, select Data, Delimited and enter. The formula then works just fine. Thanks!

I have read through many of the questions and haven’t seen one similar to mine. If it is there, I apologize for the duplicate message. I understand how to calculate time, but I cannot figure out how to have a manually entered number of hours added to a calculated number of hours. For instance, and employee works from 8:00 – 4:00. 8 hours of work. Simple enough. However, we ask that our employees indicate their travel time separately. So, if cell A1 is 8:00, cell B1 is 4:00, cell C1 is the formula calculating the total hours worked (B1-A1) of 8 hours. Cell D1 would be 1 (for illustration purposes representing 1 hour of travel time). Therefore, what formula is necessary in cell E1 adding the 8 hours worked found in cell C1 with the 1 hour of travel time manually entered in cell D1 to illustrate 9 hours total?

I need your help. I have a timesheet that I need to deduct lunch breaks based on if the shift is 6, 7, 8 hours they get a 1/2 lunch, if they work a 9 hour shift they get an hour lunch. Anything below 5.75 hours and below does not get a lunch.

I have a start time (D1) and end time (E1). I was hoping to write some kind of IF statement that would automatically calcuate what time I had to subtract from the hours worked based on total hours.

My formula now for a shift from 6:00 am to 3:00 pm is 9. I need it to show 8 hours paid.

Here is my question: I need to be able to roundup and round down in the same cell. I am thinking it needs to be an IF or an OR statement but I am not sure. For instance the spreadsheet I am using is for tracking billable time. If someone attended only 30 min we can’t bill so it would be 30=0 and if they attended 31 then it would be 31=1 or it could be .50=0 or .51=1. can you help me solve this??? thank you in advance

I have made a timesheet that states employees start and finish times, and calculates the hours they have worked for the the day, week and month and also shows any accrued hours, however, if the employees do not work the full daily hours, this is not accounted for in the accrued hours.
any idea how I can do this?

Hi Mynda,
I have Time punching Machine in our firm,
and i want to calculate our workers wages from punching m/c data:
data is in this format:
Employee No Name In Time Out Time
1 A 08:30 17:00
2 B 08:30 21:00
And my wages calculation sheet is in this format:
EmpNo Name Rate(Per Hr) Duty(8:30Hr) OT(Hr) TotalHr Amount
1 A 50 8:30 0 8:30 425
2 B 50 8:00 4 12:00 600
Please give me formulas for calculate wages or if you have any other format for calculate wages plz send me that excel file on my mail id

I have a spreadsheet with a Start Date and Time in one cell (H1), an End Date and Time in another cell (I1) and the Time Taken in the next cell (J1) with the formula ‘=I1-H1’

It calculates the time correctly all through the day, however when I change the Regional setting of the computer to 24hr format, the formula only works until midday, then when the end time is after midday it displays #VALUE!.
If I change it back to 12 hour format, it works again! I would like it to work regardless of what setting the user has set on their computer.

Do you have any ideas?
(The formats of the cells are d/mm/yyyy h:mm:ss for the first 2 and [mm]:ss for the time difference cell)

Just found the problem in the VBA code, the Start Time had Format(Now()) and the End Time used the code, Format(Now(), “d/mm/yyyy h:mm:ss”)…put them both as the latter and it works for both 12 and 24hr regional settings now

I have a series of steps that must occur at unique fixed amounts of time before a given ‘zero hour’. (All events will be within a total of 10 hours elapsed time during a single day.) Using 1830 as the zero hour for example: Step 1 must begin six hours prior, at 1230. Step 2 must begin 2 hours 45 minutes prior, at 1545. I’ve read and read and just can’t grasp how to set up the calculations. Thanks in advance!

You can use the TIME Function for these type of calculations with HOUR, MINUTE and SECOND functions where necessary. I’m not sure how your workbook is set up but to calculate 6 hours before 1830 you could do the following (Where A3 contained the time 18:30):

=A3-TIME(6,0,0)

And 2 hours 45 minutes:

=A3-TIME(2,45,0)

If you get stuck please send me the workbook via the help desk and tell me what you want to calculate and where.

I am trying to automate a time sheet to have a check figure so the beginning and end time I enter will tell me if the detail of time in columns to the left will match.

I have Time arrive and Time Departed (expressed as clock time).
Subsequent columns are the categories of hours/minutes I want a formula to the right of the sheet to compare by beginning and departure times to the detail of the entries of hours and minutes.

I have tried all my tricks and I am getting inconsistent results. Is there a webpage you might know of that can explain this specifically? I would appreciate any help provided.

Hi Mynda,
I am trying to set up columns which will add days and weeks to days and weeks. Eg if a baby is born at 36w 3d gestation and is now 4 days old, what is its corrected gestation? It is 37 weeks (obviously), but I need it to calculate this automatically.

This involves the INT function which isolates whole number from decimals.
So, when we divide the sum of days(B2+C2) by 7 we only get the whole number part
(note: not the rounded off number). This can be shown in the weeks part computation
in the formula above. In the second part, we use the same result of the INT Function this time in getting
the equivalent days in a whole week by multiplying it by 7 and deducting it from the the total days of age
and gestation.

Hi Carlo, these formulae are working really well for calculations where there are values entered in the cells as above. But when we have rows that don’t have data in them what is displayed is a 414**number, which I assume is the excel time format. I need these cells to stay blank when there are no patient details entered in them. I have tried conditional formatting, but that ends up displaying values I dont want, and not displaying values I do want. How do I fiddle with the formula to only show values when there is data entered in the required cells?

For the “Start” calculating the difference in times is successful with the formula =IF(C1>A1,C1-A1,””) shows me any occurances of “in-late” time or leaves the call blank if there is none.

BUT when I try to use that formula for the “End” times I am coming up with an error of unending ######### and I cannot seem to identify why. Can you help? (( this is not due to the cell being too small — the ## just continues))

the “End” formula I am using is
=IF(D1<B1,D1-B1,"") it does leave it blank if they leave late BUT if the employee was "out early" it gives me the error instead of the time difference. The cells are formated correclty.

Along with that – Cell E1 is where the formula lives for the “starts” difference and Cell F1 is where the formula lives for the “ends”.
if the Actual Start and End are blank. It is also possible that the Actual Start and End time cells would be blank.

The reason your formula is displaying ###### is because Excel can’t display negative time. You can ‘fix’ this using the 1904 date system but it is not recommended. Instead I recommend you use this formula:

=IF(D1<B1,B1-D1,"")

Format the cell with custom format [h]:mm

This will show any time left early as a positive number. So using your figures it will show that this employee left 1 hr 2 minutes early.

If you want to hide results where the actual start and finish time is not entered you can use this formula which checks if the finish time is blank and if so enters nothing, otherwise it calculates:

I have converted value into time by using =TIME(LEFT(B8,2),RIGHT(B8,2),0) function.

E.G. 1420 converts into 2:20 PM

However, When I drag this function to the cells below it gives me #VALUE! and I would like to use same column into a formula SUMPRODUCT in the different sheet. Due to this #VALUE! the SUMPRODUCT function is not giving me any answer.

Im working on a schedule for work and need to calculate how many employees we have at a certain time. I have the hours aranged in colums. Id like to see if I can get a formula to calculate how may employees come in before a certain time. How many stay untill a certain time.

I’m having difficulty figuring out how to format (???) a formula for calculating time between PM and AM. I used the formula =D2 (Time Out) – B2 (Time In) and it works like a charm for AM to PM. But when the Time Out is 4:00 AM and the time in is 3:00 PM I get ########. I had chosen 13:30 from the “Type” list as recommended in the How to Calculate Time in Excel 2007 tutorial.

Dear Mynda Treacy,
1st of all I would like to thank you for your wonderfull website,
I needed to ask, I am making a formula to calculate working hours & minutes, but I need 2 things:
1) Result to be in words. (For Example: 45 Hourse and 40 Minutes)
2) Hours above 24 to be included in the words. Why I am asking this point, because if I just applied [H]:mm to the cell containing words it doesn’t recognize it.

And to make it easier, here is the source/range of data to be calculated:
B13:F13

I am trying to calculate the lead time of many small projects. I use the formula below that take in consideration the working days and the working hours. I have a start date and an end date in the format (05/01/2013 08:30). Each project has a different lead time. It could be 3 hours like 4 days. I would like to subtract the lunch time (12:00 to 13:00) of the answer when it is needed.

In example: with a start date of 05/01/2013 13:30 to 05/03/2013 17:00, the formula return me 20,5 hrs based on a 8,5hrs working shift.(8:30 to 17:00) In this range of time, there is 2 lunch of 1 hrs. The answer should be 18,5 hrs.

Yours help on this will be very helpful, because I am getting headache trying to solve this.

=NETWORKDAYS(G2,J2,Variable!$H$2:$H$10)*8.5-24*(MOD(G2,1)-8.5/24+17/24-MOD(J2,1))-(INT(J2-G2)+IF(MOD(H2,1)<=TIME(12,0,0),1,0)+IF(MOD(J2,1)<=TIME(12,0,0),-1,0))
This part counts a lunch hour for every whole day worked INT(J2-G2)
This part counts an hour for start days that begin before 12 IF(MOD(H2,1)<=TIME(12,0,0),1,0)
This part subtracts an hour for end days that finish before 12 IF(MOD(J2,1)<=TIME(12,0,0),-1,0)
Kind regards,
Mynda.

While I had another question altogether, when I came across your post, it cleared so many things for me. This is definitely better than even Chandoo!

So here’s my question. I process documents in batches and record the page count and for every such batch have also calculated the time taken(end time minus start time).
But the problem arises when I try to calculate how much time does it take me to process one single page from a batch.
Please help.

I’ve a question? I need to calculate the working time between two dates
e.g. start time and end time from Monday to Saturday and from 08:00 AM till 18:00.
I’ve try several ways as datedif, int but no luck.

If you know you’ll always work from 8am to 6pm (i.e. 10 hours) then all you need to do is subtract the start date from the end date to give you the number of days and then multiply this by 10 to get the total hours.

If this isn’t the case then perhaps you could send me your workbook so that I can see how you are capturing your data.

Work Days : =CHOOSE(+WEEKDAY(A2,2),”Mon”,”Tue”,”Wed”,”Thu”,”Fri”,”Sat”,”Sun”)

Duration : =INT((B2-A2)*24)&”.”&TEXT(B2-A2,”[h]mm:ss”)

Case:

If a call is coming in at 07:00 AM then the first hour won’t tell as well as calls coming in after 18:00 PM, the last one need to be added to the following day.
I need to create an automated workbook, this is a monthly work?
Please your help is more than needed.

I’m sorry but I don’t understand your time format 3.358:49 and neither does Excel. I can’t see any start or finish times in your data.

Can you please send me your workbook with your data and explain where I find the start and finish times. I also didn’t understand what you mean by ‘if a call is coming in at 7:00 am then the first hour won’t tell’. Do you mean you don’t want to count the time before 8:00 AM?

• Start on Tuesday 02/04/2013 at 12:46:48 End on Wednesday 03/04/2013 at 11:21:07
18:00-12:46:48=5:53:52 from Tuesday and 11:21:07-08:00:00=3:21:07
The duration time should be 5:53:52 from Tuesday and 3:21:07 from Wednesday
I hope that this example made easier for you to understand the issue.
Question
1. How can I solve this issue?
2. Is it possible to create a template containing all the formulas and so one ready just to copy and paste the data, if yes could you tell me how to do this.
In advance thanks for all your effort’s

thanks a lot for your input the formula is working like a charm; for the difficult cell’s, but for the cell’s within the same day not see example below:
this is correct with the formula:
=TIME(18,0,0)-(A2-INT(A2))+(B2-INT(B2))-TIME(8,0,0)
02/04/2013 12:46 03/04/2013 11:21 Tue 08:34:19
15/04/2013 17:46 16/04/2013 09:45 Mon 01:58:19

Hope you are doing great?
I’m back again 😉
the formula is working good but now I need to take a 30 minutes from the total time.
e.g. the time after the formula is 1:30:38 should be
1:30:38 – 30 minutes 1:00:38
Could you be so kind to give me some advice please.
=IF(LEFT(A2,5)=LEFT(B2,5),B2-A2,TIME(18,0,0)-(A2-INT(A2))+(B2-INT(B2))-TIME(8,0,0))

Hi Mynda,
Sorry for the delay but I have some days off.
Thanks for your input it works. Now I have another question?
I have a column order and another deliver; I need to calculate the time between those columns.
I’ve used your previous formula:
=IF(LEFT(D2,5)=LEFT(E2,5),D2-E2,TIME(10,0,0)-(D2-INT(D2))+(E2-INT(E2))-TIME(48,0,0))
This formula is working approx. because give me a time but not the one I need.!!!
What I need is as follows:
From Monday to Thursday I believe its ok but for Fridays when the orders are coming after 15:00 don’t count as incoming on Friday but as incoming on Monday.
Could you be so kind and correct me please.

There comes a time in a formulas life where a helper column is the best approach. I think this formula is in danger of getting overly complicated (read; difficult to follow and troubleshoot months down the track) if we start nesting more IF’s and AND criteria.

A simpler solution is to add a helper column to your data for the ‘effective start date’. The formula below can check if the start date and time (in cell A2) is > 3pm on a Friday, if TRUE, put Monday’s date at 8am, otherwise use the current date and time:

=IF(AND(WEEKDAY(A2,2)=5,A2-INT(A2)>=15/24),INT(A2)+2+TIME(8,0,0),A2)

If you really want it in one formula then you’ll need to take the above formula and nest it in your formula, but I don’t recommend it.

as you can see i have three columns for me the most important are the Order and Delivery ones; I’ve use the old formula see below:
=IF(LEFT(C2,5)=LEFT(D2,5),D2-C2,TIME(7,0,0)-(C2-INT(C2))+(D2-INT(D2))-TIME(48,0,0))
but the output isn’t correct because the order was issued on the 01/05/2013 07:41 and this was delivered on the 02/05/2013 13:04.
the formula that I’m using counts working hour and not 24/7
could you be so kind an help me out of this please 😉

Thanks again I really do not know how to do this with out your help great of you and your colleagues.

yes indeed my problem was the [h] for the rest all seems to be ok.

Now the next problem:
For the same workbook and the same columns I need to exclude the Friday after 15:00 as well as the Saturdays and Sunday for the whole weekend, and start counting from Tuesday, this is just for the orders that are coming the Fridays after 15:00.
Furthermore how to exclude the bank-holidays e.g. 25 of may and so one.

I hope that you can help me with this one? I have try several formulas but not the right results please.

Indeed the Friday issue is ok now; the formula for the networkdays that I have it has two typos that was the reason. But I’ve corrected them and now it’s working like a charm.
=NETWORKDAYS.INTL(D2, F2, 1,2)
Furthermore thanks for the link to the alternative solutions I think to give a try with the VBA script. I’ll let you know if this is also working.
Thanks for your time and efforts
Have a nice weekend
Kind Regards
Jorge

How would one calculate the “after 5pm hrs” from a time sheet below…. it is not overtime or anything like that, just a differential for after 5……… all I need is the decimal hours after 5 calculated so I can multiply it by the $ differential.

Hi, I am trying to simply put AM, PM, NS in a cell based on the shift times worked, e.g if the AM shift start at 06:00 and finish at 14:00 put AM, if the PM shift start at 14:00 and finish at 22:00 put PM and finally if the NS start at 22:00 and finish at 06:00 put NS. The start and finish times will be entered just need the logic if it is AM, PM or NS

Wow! I never knew about calculating time in excel before seeing this post. Thanks a lot for the great information and reminder! You have greatly helped me here. I am looking forward to your updates. Keep it up!

Helo,
i need to calculate night time day time is calculated perfectly like in time 09:00 AM to out time 05:00 PM it shows correctly as 8:00 h:mm
but when i input night shift time as

in time 11:00 PM (23:00 hrs) to out time 07:00 AM it shows negative value even i change the formula (Actual formula is out time – in time) at this it shows negative value but when i change it opposite as =out time – in time it shows 16:00 h:mm but actually its 8 hours is it possible to calculate the time diff of night shift
.
i think excel only calculates day to night it cant calculate night to day ??? is it
pls if any answer let me know urgently 🙂

I’ve an issue, i’m making my daily activities minutes to minutes
I made sum of time function
let say in A1 i input the total times in minutes
B1 is started time, e.g. =time(8,0,0)
C1 is sum of B1+A1, the function is =B1+time(0,A1,0)

It works ok so far, but the problem came out when i put decimal in A1.
For example i put 1.5 the C1 didnt show the correct sum of the time

How about calculating rate (lb/hr) if the start & end times bracket midnight? (example: start a 100-lb batch at 23:52 and end at 00:29, so a 37 minute time, roughly 200 lb/hr). This works if I enter the date with the time: 4/15/2013 23:52 and 4/15/2013 00:29, then I can subtract these to find the difference, etc, no problem. But if I just have the times (not the calendar dates) in a column the subtraction works fine until I get to the situation I described, then I can’t get it to work easily. There must be a simple way to do it, add 1 or add 24 or something, I just haven’t figured it out yet. Thanks!

I am stock market trader, and getting live market data in excel from my broker. I want average of two cell say HIGH and LOW of the stock price, but the condition should be, say market opens at 9.15 AM. I want average till 9.30 AM. After 9.30 AM it could not affect my average value even if HIGH and LOW might change later-on.

I TRIED TO DOWNLOAD THE CALCULTE TIME EXAMPLE TO A FILE. WHEN I GO TO THAT FILE TO OPEN IT I GET AN ERROR MESSAGE THAT SAYS UNABLE TO READ FILE. I HAVE ADOBE AND ACROBAT READER ON MY COMPUTER. ANY IDEAS WOULD HELP

Hi, after looking at your example for Time x Rate to calculate wage, i have noticed to you have forgot to mention within your example that the “Charge Out Amount” cell value, the cell has to be formatted to either general or currency. Without this formatting users will experience incorrect or spurious answers as I have just experienced. Please can you update your page accordingly.
Regards

Hi – I need some help adding summed lapsed time formatted [h]:mm back to decimal value in order to check totals entered into payroll software. If A1 = 30:15 B1=1:46, I use formula =Sum(a1:a2) to return 32:01. But, I need a check column that adds these two lapsed time totals to 31.61. Any help is greatly appreciated.
Thank you

Carlo – thank you for your help. The formula worked…almost. I actually have 24 cells (formatted lapsed time) that I need to add together, converted to decimal. I was able to add to your formula additional cells. However, when seconds keep adding together past .99 and do not convert to the next whole number. For example 47.104 (I need this summation to convert to 48.04). Is there a seconds addition I need to add to the formula? Again, thanks for your help…this is way past my basics knowledge of excel!

Carlo – thanks again for your help. The true for this formula works; however, the false is coming up #Value!. I have tried several changes but none work. Here is what the false is returning based on just adding 2 summed lapsed time cells:
A1=30:15 B1=1:56
False calculates to IF(FALSE,#N/A,INT(“31.25″&71)) then..
IF(FALSE,#N/A,INT(“31.25.71”))
Formula evaluator says the very next calculation will return the error.

I am making a employee rota i need excel to add up the amount of hours an employee is rota’d

example
cell c1 i have a shift start time 21:30 then cell d1 i have a finishing time 03:30 and i have this 5 times across the row. then i want a cell at the end of the row with the amount of hours worked? but cant seem to work it th formulas out?

I need formulas for a simple time sheet, but do I have to use military time in order for it to work? The times are set to Custom: hh:mm and the Reg. hrs are: =((E12-B12+(E12<B12))-(D12-C12+(D12<C12)))*24 (and copied down for each row). Here's a copy of my sheet:

Hi
Can you help to calculate flight time duration between two airports of different time zone when I know 1- departure time,2- arrival time and 3- time difference between two time zone(+ or -)
Thanks
Anas

The difference in these two approaches are the formats in the minuends and subtrahends.
The first one has simply a time format and the second one has a date time format.
The formula/difference should always have a custom format [h]:mm:ss.

I am trying to calculate the minutes between 3:30 PM (fixed starting time) and a departure time (example) 4:30 PM without having to enter a colon and using 24 hr time. Also trying to add the total number of minutes (total from each day) x the entries for 5 days and not to receive the total hours and minutes or a method to multiply hr/mm X a specific rate per mm.

I have the problem that Excel for some reason changes my data:
I have the situation that I want to sum up mm:ss to [h(h?)]:mm:ss.

Now I have values such as 14:30 (mm:ss). But Excel just makes 14:30:00 (hh:mm:ss) out of it, i.e. I get wrong results! I tried to remove the last “:00” via several ways, but it just shows up again. Even worse, if I don’t use the “Time” format, this matter of fact is hidden. Luckily I noticed that my sum can’t be correct.

So again, my values are all < 60 minutes/1h, but all the tutorials I found on the internet only take about the SUM(hh:mm) case, not the mm:ss case.

12:23 --addend formatted as hh:mm:ss
14:30 --addend formatted as mm:ss should still be entered as 00:14:30
12:37:30 --Formula should have a format of [h]:mm:ss

I think you typed in your minutes omitting the hour part. You should still
use the syntax in typing it : hh:mm:ss (00:00:00); otherwise, 14 will be interpreted as
hours and omitted due to the mm:ss format while 30 interpreted as minutes.
Your Formula's Cell Format should be [h]:mm:ss. The h with the brackets always.
It doesn't matter what time format your addends are.
Cheers.
CarloE

Regarding number 1, well that is not a Time nor Date format in Excel.
So all you need to do is convert these times first.
At any rate, once you have converted them to Excel Time/Date Formats
more or less you will need to select these time formats:

For the difference: for 1 and 2, [h]:mm:ss
Note: Always with the brackets.

For the minuends and subtrahends:
For number 1: any time format will do
For number 2: Date with time i.e. 3/4/2013 12:30

I am calculating how many hours class videos are. Some are 00:01:54:02, some are just minutes… how do I add all these in Excel to come out with a total of hours? I have formatted the cells to time in the 00:00:00 format. Thanks!

I have a check sheet built for a large construction project with a date column of when I need to receive submitals from the contractor. The project has been delayed so I want to add two weeks (10 work days) to every entry just one time. I don’t want to include weekends or holidays?

Use the WORKDAY Function.
Add a named range for your holidays.HOW TO ADD A NAME RANGE
1 Go to Formulas
2 Click Name Manager
3 Click New and name it Holidays
4 Click Refers to and select the range of your Holidays
in my case A1:A2
(you may add more)

Named Range: Holidays
A
1 1/3/2013
2 1/4/2013

The formula:

=WORKDAY(DATE(2013,1,2),10,Holidays)
case: add january 2, 2013 plus 10 working days.
result is 1/17/13.
note: use the DATE function for the dates DATE(yr,mth, day)

2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17
3 and 4 are holidays
5,6,12,13 are Saturdays or Sundays.

I have an open time & close time in separate columns to return total time open which works as it should in another column, S. The issue I have is in the subtotal average at the base of the chart as when the formula, =r5-5b, is entered for minutes open column 0:00 is displayed as no time has been calculated which is fine. However, 0:00 is added onto the average subtotal changing the average i.e time open in s5 = 0:10, s6 = 0:12, s6 = 0:21 with an average subtotal of 0:14 though when formulas are entered below in s7 0:00 is displayed & reduced the average in the subtotal, =SUBTOTAL(1,S5:S64), to 0:10 as no open or close times have been entered yet.

How do I stop 0:00 time from either being printed in S column until times are entered in the first place or can the average subtotal not add the 0:00 time?

I really couldn’t understand where your formula is coming from and what and how…

But I used an IF function and IFERROR to show a blank should there be no entries yet or if
the data entered results to error.
Try the formula below. just replace the parts “R1-B1” with your formula r5-5b…or whatever it is.

I have a spreadsheet and I have a column with contracted hours and one for actual hours worked. I also need to create another column with the difference between the 2, e.g if contracted hours are 14 and I work 16 then obviously the difference is 2 hours. I have created a formula that works when the difference is a positive but it won’t work when it is a negative. Any suggestions?

I have to put all emplyoee hours on an excel spreadsheet ( I am new to this )
The Payroll manager is asking I make a summary of all hours worked .
How do I go about this (wht formula do I use )
Also the spreadsheet layout goes horizontal not vertical EX :
A18 to Q18
Thanks for the help Tara

Format the cell of your Formula to [h]:mm:ss
or any of those custom formats with: [h].

Then simply SUM up your time

=SUM(A18:Q18)

Or

Format the cell of your formula simply to numeric
then enter this formula.

=(SUM(A18:Q18)*1440)/60

The difference between the two is that
the former is in time format; hence, you get
the hours and minutes as totaled; while
the latter converts everthing to hourly equivalent.
So when you get a result of 7:30 it will be converted
to 7.50 hours.

i have to create a weekly employee schedule, however, i need to factor in a 30 minute lunch for any hours that exceed 6 hours some employees only work 5 hours. how can i modify the formula to accomodate this. I was thinking using the “IF”<6 THEN -0.20086(the numeric for 30 minute) but not sure.. Please Help! Thank you!

Hi Mynda
Hopefully you can help me. I need to make an excel program for clocking in and out where the time punched is rounded to tenths, but it has to match the following table:
:58,:59,:00,:01,:02,:03= :00 :04.:05,:06,:07,:08,:09=:06 :10,:11,:12,:13,:14,:15 = :12
and so on. I can get it to round to the nearest tenth, but it doesn’t match the table.

Explanation:
For Example: 1 A1 = 13:04:00 or 1:04 PM
2 A1 = 13:02:00
IF the result of E col above is positive then
A1 plus(+) the value in E col
(i.e. the index-match combo will search the minute part in A1 which is
4; hence it will pick up 2 to be added to A1
13:04 + 2 = 13:06)
ELSE IF NEGATIVE
the INDEX-MATCH COMBO will simply be multiplied by -1 to get a positive
value for the TIME FUNCTION; however, it’s substracted this time.
i.e. 13:02 PM – 2 = 13:00 PM
(Note again that the MInute 2 will return the value -2 (frm col e) but
multiplied by -1)

OK, I have 2 columns – Start & End time. I calculate how many hours a person worked by subtracting End-Start times then I subtract 30 minutes for lunch break. That’s fine except when a person works less than 7.5 hours per shift, then by law, we cannot subtract the 30 min lunch break. So, on the same cell I calculate the total hours per shift, how can I conditionally calculate NOT to subtract the 30 min break if they work less than 7.5 hours?!

I have this same issue and find it cumbersome to have to manually correct these. Is there a formula that can accomodate this to be included? I am pulling the raw data in on several tabs and want it to calculate correctly on a seperate summary tab within the same workbook without having to fuss around with manually changing :30:08 to 0:30:08. I know some of it is coming in as text but do not know how to automate this correctly as a formula. What is the formula for this??

Steps to Change to the 1904 Date System
In Microsoft Office Excel 2003 and in earlier versions of Microsoft Excel, follow these steps:

Open, or switch to, the workbook.
On the Tools menu, click Options, and then click the Calculation tab.
Click to select the 1904 Date System check box.
Click OK.

In Microsoft Office Excel 2007, follow these steps:

Click the Microsoft Office Button, and then click Excel Options.
Click the Advanced category.
Under When calculating this workbook, click to select the Use 1904 date system check box, and then click OK.

I need to create a formula to calculate stand by charges. For example, an employee who was on standby for 9 hours would get paid 1/2 hour for each 4 hr period or part thereof he was on standby. So he would be paid 1.5 hours for 9 hours. What is the formula that I would use? Thank you so much!

Hi,
I am having problems with a timesheet where a member of staff is working fewer hours than expected. This gives the problem of negative times on occasions. Also, I am trying to get a cumulative figure, which is reverting to 0 once 24 hours are reached.

Can you please add more explanation, or better if you send me your file with your example data via the help desk.

Anyway, I just tried to solve Hours Owing through this formula. Please try it.

=((N2*1440)/60)-(24*M2)

Points of Clarification:

1)Expected Hours is converted to numeric: 7:30 to 7.50. Please do clarify what format are you trying to get in O2-Hours Owing
I presumed it’s numeric.
2)I see that M2 results a percentage of total hours(24) per day So I multiplied it with 24 as you can see in the formula.
Again I converted this into numeric terms.
3) As far as Cumulative Hours (Q2) I need more info in that. Please clarify if the formula is okay already after O2-HOurs Owing
is improvised. In other words, Please explain the what are you trying to achieve in this Q2-Cumulative Hours formula.

Of course this would be clarified much better if you will put in your Excel file some mock data and there supposed manual results
so it would be easier to follow and correct.

I’ve seen few of your replies which are useful.
But didn’t solve my problem. Here is my problem
I take the working hours by subtracting the in & out timings.
In 9:33:37
Out 12:00:34
Worked 2:26:57

Like this I did for no. of swipes in a day and added the total hours for that day.
Now I want to sum those day hours to get the hours worked in a month i.e,
01.12.2012 7:43:06
02.12.2012 9:34:78
.
.
.
31.12.2012 14:45:36

Could you please help me how to add the day hours to get the monthly hours.

I am trying to make a time sheet that will calculate weekly time for my robotics team. They have to complete 88 hours at the end of our build season. I thought it would be best to put their time into an excel workbook to calculate the time they have put in. I am subtracting the end time from the start time, and I have used your format changes for the “h:mm” and still can not get my formulas to work. Could you take a look at my workbook formulas to see what I can do to get the formulas to work?

In your case, let’s say, 10:30 PM is in A1 and 8:00 PM is in B1 the result would be 2.5 hrs.
You will not need to worry about the minute part as it will be converted to its hourly equivalent.

For more discussions click Time Functions
You may also view the Post found on the right side of this/your thread. In answer to Jessica Reece’s question dated January 17, 2013 with my comment dated
January 18, 2013. Calculating Time in Excel

I am trying to add times in a timesheet, particularly where a member of staff has not been working full hours, so the worked hours are often lower than expected hours. This would often involve 2 starts and 2 end times in any day, to account for a lunch break.
I then need to sum the total worked in a week, but keep getting errors.
is there anyway I can send my spreadsheet to you to have a look at please?

Note: The result of this formula is in numeric hourly terms already and not in a time format; that is, ready
to be multiplied by your hourly rate.

OR

You may also just do this on an adjustment basis. Say you have a uniform expected hours of 9 for each employee but none of it
are the real hours rendered. The formula would still be basically the same except that you need to enter the Actual Time Break
in a Time Format. In this example, 1:30 represents 1 hour and 30 mins to be converted through a formula in Breaks for hourly rate
to be deducted from the Expected difference/hours of 9.

legend(formulas)
*=((B8-A8)*1440)/60 note: this formula may not be necessary if the expected hours is a given i.e. 9

^=((D8)*1440)/60 note: this is the same formula except that there’s only one cell argument i.e. D8
if you want to use the two range argument version then you may simply add a column i.e.
=((E8-D8)*1440)/60 the result would be the same: 1.5 hrs diff
^^=C8-E8 result is 7.5 hrs

I have also answered a similar question here in this post:
Calculating Time in Excel just look for Jessica Reece’s and Tara’s questions dated
Jan 17 and 18 respectively and my comments are dated January 18 and 19 2013 respectively.
see also Time Functions

Thank you so much for this explanation! How could I calculate overtime per day? In your example “Use Excel in Timesheets to Calculate Time Worked”, could you take the Time Worked minus 8 hours to calculate overtime? If so, what would that formula look like?

The “#VALUE!” error means that you are trying to calculate a non-numeric value or TEXT. Try re-check your entries in B2 and B9 and look if one of them is being considered as text by Excel. You might notice a green triangle on the upper left corner of the cell where your number is located. This means that excel knows that the data inside is a number but was entered as TEXT by the user. Hope this helps 🙂

You was right, but I’m still not for sure why its not working. In cell A2 i have the text saying clock in in sell B2 I have 6:00AM then in the rest of cell A3-A9 it says clock in, clocked out, lunch time and ect in B2-B9 it has numbers like 11:00AM, 2:00PM and so on til time to clock out. When i put the sum in it says value but other then the am and pm which i thought i had to put in thats the only text i have.

Im very new to this program only been missing with it for about 3 days. Please help me figure this out 🙂

I truly understand. Excel is a tough software to master but you’ll enjoy its benefits once you get a hang of it. Don’t worry, I’m more than happy to assist you with your concern. 🙂

The reason you’re getting an error is probably because of the way time is being entered. Based on what you typed above, the data in Cell B2 is “6:00AM”.

There should be a space between “6:00” and “AM”, so it should look like this: “6:00 AM”. Can you try that and tell me if it worked? BTW, can you also give me an idea on the way you clock in? Do you type the time manually, or do you press something that updates column B automatically?

Thanks so much I forgot to check for your reply, I cant believe it was something so simple (lol). Yes I type the time in manually I didn’t think you could do it automatically :o. I have a feeling its going to take me months to master excel, but if I run into more problems I’ll ask. 🙂

Thank you so much!
Jessica
lol I keep forgetting to check if Im human xD

I have one more question and I think I’ll get this down. I made a more advanced time chart for employees but now I need to make late fee deductions.
Example in cell A1 it says Start Time, 6:40 AM then in B1 it says Real Time 6:00 AM how do i deduct that time I tried =(A2-B2) and it said 12:40… lol so I know that’s way off. How would i fix it and make it deduct money from there check?

Now you could also isolate the rate into a different cell so your formula will look like this:

=((A1-B1)*1440)/60

In your case 6:40 AM minus 6 AM, The result will show the difference in minutes converted to its hourly equivalent: .666667.
You can then multiply it with your hourly rate or whatever your preference is. This is accurate
to the minute. You may then multiply .666667 with your hourly rate. Assuming it is 30 USD, The result will be 20 USD
to be deducted from your payable wages/salaries.

I am using destiny patrol software it has a feature for the Officers to clock in and clock out as follows

1003 / Sgt W. Lomax V 2013-01-06 03:00 OUT
the date and punch in time is in the same column
how can I create a formula and copy and paste the
employees punch in time and clock in time so that
the total hours are done for me…HELP

My specific problem stems from a time table I use and that the increments aren’t divided equally into an hour. For example .2 on my time table represents a 6 minute increment while .3 is a 7 minute increment. I need a way for excel to add a start time and end time while resulting in the corresponding decimal listed below:

Hello Treacy,
I am trying to calculate time duration in hours and minutes, i used a simple formular of end time-start time and evrything seem to be ok but i have some results that display ############### and from the time, i could see that all that have this problem are to calculate from PM to AM example 11:14 PM to 1:14 AM, 11:20 PM to 3:05 AM, 6:17:00 PM to 12:08:00 AM, 11:33 PM to 2:35 AM all others seem to be ok. what do i do pls?

OK. Lets see if I can expain this where its understandable. I have several tabs Jan – Dec in workbook. I also have YTD Summary Sheet. On each month I have several columns that have totals. I want total to automatically update on YTD page. I know how to do the formula for each column by itself but I would like to have a formula that I can copy over and it picks up the same totals on each sheet (Feb, mar, apr)…etc. and the YTD updates. Does this make sense? When I copy the first set of numbers and try to copy it down in the YTD worksheet the totals are zeros.

I have a basic roster with start time and finish time, eg start 07:00, finish at 17:30. I want to calculate each person’s daily hours, so finish time MINUS start time and I need to automatically deduct their 30 minute lunch break without adding an extra column (so in fact they have been at work for 10.5 hours, but I only want to show up 10 hours as somehow I need to minus the 30 minute lunch break). Hope this makes sense.

hi
very helpful
but having got timesheet working, i wanted to compare actual hours with contract hours to get hours worked over / (under)
but, if the result is negative it will only display as ###########
how can it be done?
thanks

I have a formula =mod(d3-c3,1) in a cell (formated with [h]:mm:ss) The answer is coming up “value! due to text being in d3…..which is ok? But now I need to add the whole column up and I’m getting “value! due to that word showing up in the column. How can I get a total for the rest of the times in that column.

I am trying to set up a work schedule that will add up each employees hours scheduled. Our store is open 5 a.m. – Midnight so we have every shift imaginable around the clock. I have the formula set up to accomodate basic shifts like 8 a.m. – 4 p.m. What I can’t get to work is 4 p.m. until 12 a.m. (I cannot use military time on my schedule). When I enter 4:00 p.m. – 12:00 a.m. I get 24 hours worked instead of 8 hours worked. I need a formula that will accomodate every employee working both the 8 a.m. – 4 p.m. as well as the 4 p.m. – 12:00 a.m. Make sense?

Is there any way that I can merge cells E1 – E3 to calculate the total hours worked in that day – the admin hours worked in that day? I want to see them in the one cell, and not in three different totals for that day. when the cell is merged, it only sees the sum for the first line.

I saw your blog and find it easy to understand. Maybe you can help me with the solution of this problem, create a solution related to time – when time in is entered on the declaration cell solution will tell if an employee is late for how many hours &/or minutes or an employee is on time or early.
Example:
WorkTime: 8:00 AM
TimeIn: 9:15 AM
Time check result: 1 Hour and 15 minutes Late

You can do a simple sum to calculate the difference between two times.

Let’s say WorkTime is in cell A1 and TimeIn is in cell B1, you can simply enter =B1-A1 in a spare cell and it will calculate the time late. Format the cell with a time format and it will display the ‘time check result’ 1:15

Thannks for the help. I already did what you have told but the thing is the result must exactly be “1 Hour and 15 minutes Late” not just 1:15. What condition can I used in order to show the Hour and minutes Late?

To insert a custom number format select the cell containing the time you want formatted > press CTRL+1 to open the format cells dialog box.
On the Number tab under Category choose ‘Custom’.
In the ‘Type:’ field enter the format above then press ok.

I’m trying to make a worksheet that calculates time plus drive time into hrs. Time In time out, time in time out plus drive time = how many hrs: 6:00am 11:00am, 12:00pm 3:00pm plus 1hr 15min drive time.

I hope you can help me unravel a mystery. We have one customer who insists that we bill jobs in tenth hour increments only (.1, .2, .3, etc.), but allows us to round everything up to the next tenth of an hour. Examples:

Amount of time worked: Amount we bill:
.01 of an hour to .10 of an hour .1 of an hour
.11 of an hour to .20 of an hour .2 of an hour
.21 of an hour to .30 of an hour .3 of an hour

To simplify the spreadsheet, let’s say I am using the following columns:

This is NOT CORRECT! This should be exactly a half hour, not 6/10ths of an hour.

Some time ranges work correctly, but others do not work correctly. More examples that do not work correctly are:

7:20am – 7:50am
12:10pm – 12:40pm
1:10pm – 1:40pm
3:10pm – 3:40pm

These are just a few examples. We work and bill for any amount of time, but I have only been working with 1/2 hour increments to make it easy for me to troubleshoot, but I don’t know what is happening. It seems like ROUNDUP would be the correct formula to use and that an exact amount should NOT round-up to the next tenth of an hour. In other words, if the amount we worked was 1/2 hour, ROUNDUP should result in .5, not .6 as some of the above examples show. If we worked .51 hours, it should round up to .6.

Hi again, Mynda…I’ve spent hours on this. Incidentally, =TIMEVALUE does not work properly in all cases either. I’ve tried all iterations of ROUNDing that I can think of, increased/decreased the number of decimal places, etc. If you can help, I would be most appreciative! The formulas seem to work in “most” cases, but not all which I assume is related to the conversion of time values to numeric values.

BTW, to clarify how we bill this customer:

If we work .01 of an hour to .10 of an hour, we bill .1 of an hour
If we work .11 of an hour to .20 of an hour, we bill .2 of an hour
If we work .21 of an hour to .30 of an hour, we bill .3 of an hour
etc…..

Thank you for your help, Mynda. I’m still having trouble and am hoping you can steer me in the right direction.

1. I entered 12:10 AM in A1 and 12:40 AM in A2, then 1:10 AM in B1 and 1:40 AM in B2, all the way down to 11:10 PM in A24 and 11:40 PM in B24 — therefore, all 24 time ranges should return .5 hour. I ensured that all 48 cells (A1-B24) were formatted as Time.

2. I entered =ROUNDUP((A2-A1)*24/(10/60),0)*10/60 in cell C1 and copied the formula down through C24, and ensured all 24 cells (C1-C24) were formatted as Number.

3. Some of the formulas returned .50 perfectly, and some of them returned .67.

4. In an attempt to troubleshoot, I then entered from and through values that correctly returned .50 into cells where the formula was returning .67 to see what happened, and they STILL returned .67! In other words, sometimes 3:10 AM – 3:40 AM returned .50 and other times it returned .67.

I checked, double-checked and triple-checked to ensure that everything looks right, formatting is the same, etc. I cannot see anything that looks “off” at all.

Do you have any ideas what I may be doing wrong? Or is it Excel? I am using Excel 2008 for Mac version 12.3.4 — could that have anything to do with this problem I’m encountering?

Thanks again for any wisdom you can impart. I truly appreciate your time and expertise!

I need to arrive at work at 9:00 AM.
I need 90 minutes to get ready in the morning and travel to work.
I need the calculation to tell me what time I should get up. That would be 7:30 AM. I hope to learn what formulas to use to calculate what time I should get up. I hope to learn what formatting to use to calculate what time I should get up.

I am trying to calculate the number of 15 minute increments. I have the time stated in hours, minutes and seconds (1:01:16) in cell A1. I’d like to calculate this to be 4 increments in cell A2. How do I do that?

i would like to know if there is a formula to calculate working time minus breaks ie 45 mins within the 24 hour period and above so if start time is 02:00 and finish time is 17:00 minus 45mins brk and also within the same cells the same could calculate for 14:00 start to 05:00 finish minus brks and still leave the correct answer after the 24hour clock

Hi Mynda, thanks for your explanation, it is the clearest one I’ve been able to find anywhere! You’ve already solved half of the trouble I was having.

What I could use help with now: how can I sort rows by time of day? I’m trying to make a schedule for cooking a complicated menu and I was able to input the prep and cooking times I would need for each item (and display as actual h:mm using your tips, thank you!).

Now I want to make a schedule, working backward from the meal time. So if we want to eat at 7pm, the roast needs to go in at 3pm (7pm-4 hours), roast prep begins at 2pm (7pm-5hrs), etc. I have each to-do on its own row and was able to get the calculations to work. But when I try to resort them to see which thing needs to be done first, second, last, all of the calculations get screwed up.

I’m not including the meal time cell in the cells for sorting. I used smallest to largest for the sort, is there another criteria I should use?

=09/30/2012 23:45+”9:30″ then its giving #Value!
=10/08/2012 04:01+”9:30″ then its giving 10/08/2012 13:31
in excel 2007
same above working fine on my friend PC giving date time at line 1
i.e. 09/31/2012 9:15
this we do for convering EST to IST
do i need to change any options in my excel options, please help.

I don’t know. I get errors with both of those scenarios on my PC. Why are you adding the 9:30 as text, i.e. surrounded by double quotes like this “9:30”? Have you tried to add it without the double quotes?

I am using a macro to format the content of a CSV file and convert it to an XLSX file. My only problem is that chargeable time (in minutes) is shown in the CSV file as a bare figure e.g. 6, rather than 00:06. What formatting should I apply to the chargeable time column in Excel (2010) to get it to show ‘6’ as ’00:06′?

I am having a problem adding up timings for build project. I am able to add hh:mm:ss, but my timings are in dd:hh:mm.
Currently have times in seperate columns, (dd, hh, mm) but then have to work out the carry overs. And dont really want to covert days to hours for inputting. Any ideas of best way to add….
Typical values are 1d,20h,37m…2d,10h,0m…3d,3h,24m..

I’m assuming the data in your columns are simply the number value, you don’t have d, h or m appended to each value. If so you can use this formula to calculate the time for each row (where column A contained your days value, column B = hours and C = minutes):

=DAY(A2)+TIME(B2,C2,0)

Then you can SUM the column for the above formula and format the time as [h]:mm and it will correctly add up the total as a total hours and minutes.

Hi,
I have time sheets entered in Excel that I need to calculate down to 5 minute time periods at the lowest for billing of clients. I am going around in circles.

So if the staff enter 9.00 (in cell A1) and 9.05 (in cell B1)
I want it to calculate the 5 minutes in cell C1, so my bottom total shows total hours for the month and we can calculate charge out rate on that in cell D.
It is not always 5 minutes though could be 1hr, half hour, 25 minutes, so I need a formula that covers all possible scenarios between 5 minutes and 8 hours (max day) for a task.

I need to create an autocalculating timesheet for my work. There is an error somewhere in my formula’s which, when converting the decimal calculation (Column F) into time (Column G), displays o’clock minutes as h:60 rather than h:00. for example, if the amount of hours was 8, rather than displaying as 8.00, the cell displays as 8.60, see below
C D E F G
Start Meal Finish Calculation Normal Hours
8.00 0.3 17.00 8.5 8.30
8.30 0.3 17.00 8.0 8.60 (Should display as 8.00)

For some reason the MOD function in column G is calculating MOD(F7*60,60) as 59.99999′ when it should be 0. The round is then rounding the 59.999′ up to 60, hence your result of 8.60.

That aside, I would have thought if you wanted your fractions converted to time you should end up with a time value as opposed to a decimal value.

i.e. your end result should be 8:30 not 8.30 since 8.30 is actually 8 hours and 18 minutes (60 minutes x .30), not 8 hours 30 minutes. If you were to use your result in a formula it would give the incorrect time.

If you simply want to convert your fractions to time then in column G you can use this formula:

Hi I am trying to work out a finishing time based on a variable rate, my rate calculations seem to be fine, it is when i try and divide the quantity by the rate, and then add the current date/time that i am generating impossible times, can you help please!!

The workbook is a .xlsx file. Your browser is changing the file extension (probably to a .zip) when you download it. All you need to do is download it again but before you save it make sure the file extension is .xlsx by typing over the file extension in the ‘file save as’ field (or equivalent in your broswer).

Thanks for your question. You can use the TIME function to specify how many minutes and seconds you want to add. Let’s say your start time of 6:00:00AM is in cell A1. Your formula in cell A2 will be like this:

I am trying to calculate how much time is “owed” if an employee works a shorter day than normal. however when i subtract the total time worked from the number of hours that should be worked i get ######. Can you help

The #### error indicates that the column width is too small. You need to widen the column to see the result. It is then possible that the cell formatting is not the one you want, so you may need to change the number format to see it as a number as opposed to a time or vice versa.

Dear Madam,
I am typing 10:30 but the cell is showing 0.4375. Why and how can it show 10:30. I have gone to custom and done everything as per your guidelines.
Thanks for sharing such useful tips. Regards,
Tarak

The 0.4375 is displaying because the cell is formatted as ‘General’. You need to change the format of the cell to a Time format. To do this:

1. Press CTRL+1 to open the Cell Formatting dialog box
2. On the Number tab choose ‘Time’
3. Choose the time format you want from the list or,
4. Create a custom number format by clicking on ‘Custom’ in the ‘Category’ list, then enter hh:mm in the ‘Type’ field and press OK.

If this still doesn’t work then I suspect the value of 0.4375 is entered as text. If so; delete the value, then format the cell as described above and re-type the value in the cell. Don’t copy and paste it from somewhere else, but if you do make sure you Paste Special > Values.

Hi,
I have a for me difficult question. Couldyou help me out.
I like to have a formule where i can calculate the hours i worked in shift.
For some hours i get a surcharge on my hourly rate.
I give an example.
i have worked on saturday from 06:30 to 22:30
The formule should show me the foolowing result.
1½ hour against 138% (time between 06:00-08:00) * hourrate
4 hours against 100% (time between 08:00-12:00) * hourrate
8 hours against 138% (time between 12:00-22:00) * hourate
0,5 hours against 149% (time between 22:00-24:00) * hourate
14 hours (total) Total : earnings

I think the simplest solution is to use helper cells to identify which hours worked fall into the ‘surcharge’ rates. You can use an IF statement to identify the number of hours that are at 138%, 149% and 100%, then apply your rate to that.

Combining all these rules into one formula would be cumbersome and I’d recommend you don’t do it that way.

Hi – how do I add up tasks (say, 30 minutes, 1 hour, 15 minutes) to find out how much time to allot? I have the formula working using h:mm (that is, the sum is correct) but it shows me 0:00 or 12:00 instead of :30 like I’d like it to display. ThankS!

Trackbacks

[…] a formula you need to tell Excel it is a date using the DATE function, alternatively you can use the date’s serial value. However, I find the DATE function more intuitive and easier to follow when I revisit a formula […]

Resources

Affiliate Program

Microsoft and the Microsoft Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Product names, logos, brands, and other trademarks featured or referred to within this website are the property of their respective trademark holders.

✕

Hang On, Don't Go Just Yet.

As a thank you for visiting how would you like a10% Discount Code to use with any of my courses?