Calculate Total Time

Robby19

Board Regular
Joined
Mar 19, 2018
Messages
227
Good day!

I have a table that looks like
[TABLE="width: 500"]
<TBODY>[TR]
[TD]Day
[/TD]
[TD]IN
[/TD]
[TD]OUT
[/TD]
[TD]IN
[/TD]
[TD]OUT
[/TD]
[TD]Hours
[/TD]
[/TR]
[TR]
[TD]1-Jul
[/TD]
[TD]8:00
[/TD]
[TD]12:00
[/TD]
[TD]13:00
[/TD]
[TD]17:00
[/TD]
[TD]8 hours, 0 minutes
[/TD]
[/TR]
[TR]
[TD]2-Jul
[/TD]
[TD]8:00
[/TD]
[TD]12:00
[/TD]
[TD]13:00
[/TD]
[TD]17:30
[/TD]
[TD]8 hours, 30 minutes
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Total Hours
[/TD]
[TD][/TD]
[/TR]
</TBODY>[/TABLE]

Hours column is formatted as such, h "hours," m "minutes" and is a calculated column;
Code:
=(e10-d10)+(g10-f10)

I need to calculate the Total Hours. In this example, it should say 16 hours, 30 minutes. I tried using a SUM, but it only seems to show the maximum for some reason. Can anyone help me?
 
Last edited:

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Thank you for the response!

Is there a way to format the cell so that if I type in 800, it will automatically adjust to 8:00?
 
Upvote 0
Thank you for the response!

Is there a way to format the cell so that if I type in 800, it will automatically adjust to 8:00?
You are welcome.

Here's one way that uses a helper column. Let' say that's col A for this example. First, format the helper column as text. Then in A1 enter 0800 (4 digits). Format col B as "h:mm". In B1 enter: =(LEFT(A1,2)&":"&RIGHT(A1,2))+0
B1 will now hold a time (a number not text) of : 8:00.
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,289
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