SUM from multiple formulas (time difference calc)

Endosmok

New Member
Joined
Oct 20, 2017
Messages
20
Ok. I have 7 columns based off each day of the week.
There is a START row and a STOP row for start/stop times under each day of the week.
They are in military time format.

I can get the time difference between START and STOP with a simple formula
=STOP-START

I can also SUM up the time difference for each day of the week into one cell (though it's a long formula) but it works.

Here's where I run into an issue. When the time goes into the next day you get ###### when calculating the time difference.
example, Start Time of 2000 with an End Time of 0200. I found a fix for that off the internet.
The new formula to handle this issue is =IF(STOPTIME>STARTTIME,STOPTIME-STARTTIME,STOPTIME+1-STARTTIME)
example, =IF(B9>B8,B9-B8,B9+1-B8) this works fine for the ##### issue and gives the correct result.

So my issue is this.... I don't know how to SUM up everything into one cell now that I have to use that =IF statement

So logically (not thinking in excel) I figure it would be...

=IF(B9>B8,B9-B8,B9+1-B8) + =IF(CB9>C8,C9-C8,C9+1-C8) + next day of week + next day of week + etc would equal the SUM of the time difference total for the whole week.

I can't figure out how to get this to work for a result in a single cell.

The other solution I can think of is use the above working IF formula in a hidden row for each day of the week and have it total to a visible cell but I don't know if that would be the right way to go about this.

Any suggestions would be greatly appreciated. I almost have this working... except this last issue.

Thanks
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Re: Need help with SUM from multiple formulas (time difference calc)

why not use date time format eg 15/10/2017 22:17:41

then subtraction from Tue to Mon eg is seamless
 
Upvote 0
Re: Need help with SUM from multiple formulas (time difference calc)

why not use date time format eg 15/10/2017 22:17:41

then subtraction from Tue to Mon eg is seamless

but how would you get a grand total ... I can do the subtraction just fine. It's the total sum of the time difference for the entire week that I cannot get. So are you suggesting that I switch the time/date format in order to have an easier sum calculation?

I believe I tried the a similar time format above but I couldn't get it to work properly, but I am a excel amateur so there's a possibility I was going about it wrong.
 
Upvote 0
Re: Need help with SUM from multiple formulas (time difference calc)

Also, I am trying to make time entry as seamless as possible. So currently, if I type 1545 it gets converted to 15:45 automatically. I thought the below format I had to enter in everything properly. I don't necessarily need to know the exact day with a date, but more a single shift. Shift time is calculated on a 24 hour basis, so if one day runs into the next it still calculated as one day within the 24 hr period.

why not use date time format eg 15/10/2017 22:17:41

then subtraction from Tue to Mon eg is seamless
 
Upvote 0
Re: Need help with SUM from multiple formulas (time difference calc)

1545 is converted to 15:45 a true time so convert it to today() + 15:45


given you have 5 starts and 5 stops do you want the total time worked ?
 
Upvote 0
Re: Need help with SUM from multiple formulas (time difference calc)

1545 is converted to 15:45 a true time so convert it to today() + 15:45


given you have 5 starts and 5 stops do you want the total time worked ?

Total time was/is the issue I have right now using the IF formula above. I was trying to figure out how to get 7 if formulas to give me a grand total.
 
Upvote 0
Re: Need help with SUM from multiple formulas (time difference calc)

[TABLE="width: 576"]
<colgroup><col width="64" span="9" style="width:48pt"> </colgroup><tbody>[TR]
[TD="width: 64"][/TD]
[TD="width: 64"][/TD]
[TD="width: 64"][/TD]
[TD="width: 64"][/TD]
[TD="width: 64"][/TD]
[TD="width: 64"][/TD]
[TD="width: 64"][/TD]
[TD="width: 64"][/TD]
[TD="width: 64"][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD="class: xl22, align: right"]09:30[/TD]
[TD="class: xl22, align: right"]15:30[/TD]
[TD="class: xl22, align: right"]06:00[/TD]
[TD="class: xl23, align: right"]0.25[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD="class: xl22, align: right"]09:45[/TD]
[TD="class: xl22, align: right"]16:00[/TD]
[TD="class: xl22, align: right"]06:15[/TD]
[TD="class: xl23, align: right"]0.26[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD="class: xl22, align: right"]10:00[/TD]
[TD="class: xl22, align: right"]16:30[/TD]
[TD="class: xl22, align: right"]06:30[/TD]
[TD="class: xl23, align: right"]0.27[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD="class: xl22, align: right"]10:15[/TD]
[TD="class: xl22, align: right"]17:00[/TD]
[TD="class: xl22, align: right"]06:45[/TD]
[TD="class: xl23, align: right"]0.28[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD="class: xl22, align: right"]10:30[/TD]
[TD="class: xl22, align: right"]17:30[/TD]
[TD="class: xl22, align: right"]07:00[/TD]
[TD="class: xl23, align: right"]0.29[/TD]
[TD="class: xl23, align: right"]1.35[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD="class: xl23, align: right"]2.08[/TD]
[TD="class: xl23, align: right"]3.44[/TD]
[TD][/TD]
[TD="class: xl23, align: right"]1.35[/TD]
[TD="align: right"]32.5[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD="colspan: 6"]add all the start times and subtract from total of finish times[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD="colspan: 3"]working with numbers[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD="colspan: 3"]as demonstrated above[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
Re: Need help with SUM from multiple formulas (time difference calc)

Ok... let me try to grasp this... your 3rd column is the time difference, correct? which equals the 32.5?
2.08 is total of start time, 3.44 total of end time? 1.35 is your subtraction. How does 1.35 correlate to 32.5? Once I see that I will understand it more.
Also, using your method... what if a start time is 1900 and end time is 0300? does it still work?


[TABLE="width: 576"]
<tbody>[TR]
[TD="width: 64"][/TD]
[TD="width: 64"][/TD]
[TD="width: 64"][/TD]
[TD="width: 64"][/TD]
[TD="width: 64"][/TD]
[TD="width: 64"][/TD]
[TD="width: 64"][/TD]
[TD="width: 64"][/TD]
[TD="width: 64"][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD="class: xl22, align: right"]09:30[/TD]
[TD="class: xl22, align: right"]15:30[/TD]
[TD="class: xl22, align: right"]06:00[/TD]
[TD="class: xl23, align: right"]0.25[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD="class: xl22, align: right"]09:45[/TD]
[TD="class: xl22, align: right"]16:00[/TD]
[TD="class: xl22, align: right"]06:15[/TD]
[TD="class: xl23, align: right"]0.26[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD="class: xl22, align: right"]10:00[/TD]
[TD="class: xl22, align: right"]16:30[/TD]
[TD="class: xl22, align: right"]06:30[/TD]
[TD="class: xl23, align: right"]0.27[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD="class: xl22, align: right"]10:15[/TD]
[TD="class: xl22, align: right"]17:00[/TD]
[TD="class: xl22, align: right"]06:45[/TD]
[TD="class: xl23, align: right"]0.28[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD="class: xl22, align: right"]10:30[/TD]
[TD="class: xl22, align: right"]17:30[/TD]
[TD="class: xl22, align: right"]07:00[/TD]
[TD="class: xl23, align: right"]0.29[/TD]
[TD="class: xl23, align: right"]1.35[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD="class: xl23, align: right"]2.08[/TD]
[TD="class: xl23, align: right"]3.44[/TD]
[TD][/TD]
[TD="class: xl23, align: right"]1.35[/TD]
[TD="align: right"]32.5[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD="colspan: 6"]add all the start times and subtract from total of finish times[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD="colspan: 3"]working with numbers[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD="colspan: 3"]as demonstrated above[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,286
Members
452,631
Latest member
a_potato

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top