time calc

Trevor3007

Well-known Member
Hi,

I need some help regarding time start / end calc.

I use this formula
=SUM(E28-F28)-H28

I have to input these times using the 24hr clock and allow for a 00:30 minute break . So when I enter :
(cell e28)Start time = 18:00
(cell f28)End time = 02:00
(cell h28) Break time = 00:30
In the the 'hours worked (cell c28) it should display '7:30'( which takes into account minus the 00:30min break), but instead returns 15:30? Can someone please show me what is required to give the correct result?

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.

arthurbr

Well-known Member
The SUM function you are using is redundant
Try
Excel Formula:
``=MOD(F28-E28,1)-H28``

Trevor3007

Well-known Member
Thank you Arthurbr !

The SUM function you are using is redundant- did not even know this & have used =sum for like ever. Cheers for the tip.

Yeah that works, but , I have to total ( cell c28)l up the hours worked & using the formula =SUM(C28:C34) , it should read 37.5 but instead it displays 10:30.

Also is it possible to add in the start time (18:00)so the end would automatically add 8rs & return (02:00)

.kind regards

arthurbr

Well-known Member
I don't see the link between the decimal value 37.5 and 10:30
You can format the total as a number like
Excel Formula:
``=sum(c28:c34)*24``
or as time. As it seems that the total time is more than 24 hrs you have to total as you did
Excel Formula:
``=sum(c28:c34)``
and use a custom format like [h]:mm

arthurbr

Well-known Member

Also is it possible to add in the start time (18:00)so the end would automatically add 8rs & return (02:00)
I don't understand this requirement

Trevor3007

Well-known Member
evening arthurbr,

thanks for getting back to me & apologies for my delay getting back to you.

Will do my best to explain.

I am trying to minimise the amount of input required . So just by putting in the start time (in this case 18:00) the end time would populate & add 8 hours = 02:00 ( start time = 18:00 + 8) = end time 02:00 .

Hope i've explained this more clearly? Thanks again.

arthurbr

Well-known Member
Like
Excel Formula:
``=E28+8/24``
?

rhombus4

Well-known Member
Hi,

I need some help regarding time start / end calc.

I use this formula
=SUM(E28-F28)-H28

I have to input these times using the 24hr clock and allow for a 00:30 minute break . So when I enter :
(cell e28)Start time = 18:00
(cell f28)End time = 02:00
(cell h28) Break time = 00:30
In the the 'hours worked (cell c28) it should display '7:30'( which takes into account minus the 00:30min break), but instead returns 15:30? Can someone please show me what is required to give the correct result?

You get 15:30 because the start and end time are the wrong way round
E28-F28 - h28 is 18 - 2 - 0.5 hence 15.5
Should be
F28 - E28 - h28 is 0200 - 1800 (8) - 0.5 is 7 1/2

Replies
2
Views
50
Replies
3
Views
29
Replies
4
Views
92
Replies
1
Views
82
Replies
1
Views
63

1,141,818
Messages
5,708,768
Members
421,588
Latest member
Wawie

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.

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

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