time calc

Trevor3007

Well-known Member
Joined
Jan 26, 2017
Messages
589
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?

many thanks in advance
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".

arthurbr

Well-known Member
Joined
Dec 8, 2006
Messages
2,302
Office Version
  1. 2010
The SUM function you are using is redundant
Try
Excel Formula:
=MOD(F28-E28,1)-H28
 

Trevor3007

Well-known Member
Joined
Jan 26, 2017
Messages
589
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
Joined
Dec 8, 2006
Messages
2,302
Office Version
  1. 2010
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
Joined
Dec 8, 2006
Messages
2,302
Office Version
  1. 2010

ADVERTISEMENT

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
Joined
Jan 26, 2017
Messages
589
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.
 

rhombus4

Well-known Member
Joined
May 26, 2010
Messages
508
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
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?

many thanks in advance
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
 

Forum statistics

Threads
1,141,818
Messages
5,708,769
Members
421,589
Latest member
b_gernert

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
Top