Deduct 20 mins break

Sandy42

New Member
Joined
Mar 15, 2023
Messages
3
Office Version
  1. 2019
Platform
  1. Windows
Is there a formula to deduct a 20 min break from hours worked when the hours are greater than 5hrs 59 mins and show the actual hours if less than 6 I.e. anything less than 6 won't have a break deducted?
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
I'm assuming you have a field for hours worked. How is it formatted?
 
Upvote 0
I'm assuming you have a field for hours worked. How is it formatted?
Hi, start and finish hrs are h:mm AM/PM, total hours worked hh:mm using =mod(finish time-start time,1)

I have column hrs minus break as =if(and(isnumber(starttime),isnumber(finishtime)),mod(finishtime-starttime,1)-if(weekday(datecell,1)>0,0.33/24,1,24),0*24)

I can't figure out to only take 20 mins off anything above 5hrs 59 mins or just show hours worked if less than 6hrs?
 
Upvote 0
I don't know if this is the most elegant way to do it, but it seems to work.

Book1
ABCD
1Start timeEnd TimeTime workedTime less 20 min if 6 or more hours
28:00:00 AM1:00:00 PM5:005:00
38:00:00 AM4:00:00 PM8:007:40
Sheet1
Cell Formulas
RangeFormula
C2:C3C2=TEXT(B2-A2,"h:mm")
D2:D3D2=IF(VALUE(TEXT(B2-A2,"h"))>=6, TEXT(B2-A2-1/72,"h:mm"), TEXT(B2-A2,"h:mm"))
 
Upvote 0
Solution
I don't know if this is the most elegant way to do it, but it seems to work.

Book1
ABCD
1Start timeEnd TimeTime workedTime less 20 min if 6 or more hours
28:00:00 AM1:00:00 PM5:005:00
38:00:00 AM4:00:00 PM8:007:40
Sheet1
Cell Formulas
RangeFormula
C2:C3C2=TEXT(B2-A2,"h:mm")
D2:D3D2=IF(VALUE(TEXT(B2-A2,"h"))>=6, TEXT(B2-A2-1/72,"h:mm"), TEXT(B2-A2,"h:mm"))
Thanks for your time and input👍, very much appreciated.
 
Upvote 0

Forum statistics

Threads
1,215,217
Messages
6,123,675
Members
449,116
Latest member
HypnoFant

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