Time Card Calculates ALL possible shifts with Automatic Deduction of 30 min Lunch Time

ShannaBanana

New Member
Joined
Jan 7, 2017
Messages
8
Was hoping someone could help me?

I need to calculate all possible shifts with an automatic deduction of 30 min lunch time when the employee works 6 or more hours.

I have this formula so far:

Time in: A1
Time Out: B1
Total Hours: C1

A1 and B1 formated 1:30 PM
C1 formated 13:30

Formula: =IF(B1<A1, B1+1,B1)-A1

Now I just need to auto deduct 30 minutes for employees working 6 hours or more? Can anyone help with this last step?
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
For some reason, my formula (above) did not come through. =IF(B1<A1,B1+1,B1)-A1

I just need to deduct 30 minutes for employees who worked 6 hours or more?
 
Upvote 0
I think you probably have < or > in there, make sure there is a space either side, or the forum wont post it,

Did you try my suggestion?
=B1-A1-if(B1-A1 > 0.25,30/60/24,0)
 
Upvote 0
Thank you. I tried this and it didn't deduct the 30 minutes. I think its on the right track but not quite getting there. Perhaps something with formatting? What do you suggest for format on C1 cell?
 
Upvote 0
Try this (caveat: time in and time out should be on the same day):

=B1-A1-(B1-A1>=0.25)/48
 
Upvote 0
Thank you. It works great for same day workers, but I have several people who work until 1 am so I have got to make it work for everyone. Thanks again.
 
Upvote 0
These are the kind of things that you need to specify right up front, so we know what we are dealing with
 
Upvote 0
My apologies, I should have been more specific than "all possible shifts" I should have said more to explain myself.

This formula needs to work for 7:00 pm to 2:00 am in the morning as well as 9:00 Am to 5:00 Pm at night.
 
Upvote 0

Forum statistics

Threads
1,226,064
Messages
6,188,674
Members
453,490
Latest member
amru

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