Time Calc

HappyChappy

Active Member
Joined
Jan 26, 2013
Messages
383
Office Version
  1. 2019
  2. 2010
  3. 2007
Platform
  1. Windows
c3 and d3 are start and finish times
e3=MROUND(C3,(1/24/60)*15)
f3=MROUND(D3,(1/24/60)*15)
g3=MEDIAN("05:00","23:00",IF(F3<E3,1+F3,F3))-MEDIAN("05:00","23:00",E3)
g3 gives me correct time worked but i want to be able to deduct 30 mins from the total any help with this one please
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Essex23.24.xlsx
ABCDEFGH
1DayDateStart/Finish TimesRounded Time to nearest 15 MinRounded Time to nearest 15 MinHours WorkedPaid
2JuneHours WorkedTotal HoursPaid
3Monday29/05/202300:0000:000:0000:00 £150.00
4Tuesday30/05/202300:0000:000:0000:00 £150.00
5Wednesday31/05/202306:0016:156:0016:159:45£150.00
6Thursday01/06/202306:0016:456:0016:4510:15£150.00
7Friday02/06/202306:0016:006:0016:009:30£150.00
8Saturday03/06/202300:0000:000:0000:00 £150.00
9Sunday04/06/202300:0000:000:0000:00 £150.00
1005:3029:30£1,050.00
June
Cell Formulas
RangeFormula
A3:A9A3=B3
E3:F9F3=MROUND(D3,(1/24/60)*15)
G3:G9G3=IF(OR(C3=0,D3=0),"",MEDIAN("05:00","23:00",IF(F3<E3,1+F3,F3))-MEDIAN("05:00","23:00",E3)-TIMEVALUE("00:30:00"))
H3:H9H3=IF($G3>0,150,"")
F10F10=SUM(G3:G9)
G10G10=CONCATENATE(24*DAY(F10)+HOUR(F10),":",MINUTE(F10))
H10H10=SUM(H3:H9)
B4:B9B4=B3+1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
C3:D9Cell Value>0textNO




your formula works great but it has thrown up an error in col H as you can see its giving me £150 for zero hours worked
 
Upvote 0
Essex23.24.xlsx
ABCDEFGH
1DayDateStart/Finish TimesRounded Time to nearest 15 MinRounded Time to nearest 15 MinHours WorkedPaid
2JuneHours WorkedTotal HoursPaid
3Monday29/05/202300:0000:000:0000:00 £150.00
4Tuesday30/05/202300:0000:000:0000:00 £150.00
5Wednesday31/05/202306:0016:156:0016:159:45£150.00
6Thursday01/06/202306:0016:456:0016:4510:15£150.00
7Friday02/06/202306:0016:006:0016:009:30£150.00
8Saturday03/06/202300:0000:000:0000:00 £150.00
9Sunday04/06/202300:0000:000:0000:00 £150.00
1005:3029:30£1,050.00
June
Cell Formulas
RangeFormula
A3:A9A3=B3
E3:F9F3=MROUND(D3,(1/24/60)*15)
G3:G9G3=IF(OR(C3=0,D3=0),"",MEDIAN("05:00","23:00",IF(F3<E3,1+F3,F3))-MEDIAN("05:00","23:00",E3)-TIMEVALUE("00:30:00"))
H3:H9H3=IF($G3>0,150,"")
F10F10=SUM(G3:G9)
G10G10=CONCATENATE(24*DAY(F10)+HOUR(F10),":",MINUTE(F10))
H10H10=SUM(H3:H9)
B4:B9B4=B3+1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
C3:D9Cell Value>0textNO



Works great but it has thown up an error in Col H it now pays me on days not worked would be nice if this was the case..
 
Upvote 0
you Sir are marvelous
The marked solution has been changed accordingly. In your future questions, please mark the post as the solution that actually answered your question, instead of your feedback message as it will help future readers. No further action is required for this thread.
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

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