Excel Timesheet Rounding

ChelseaNaomi

New Member
Joined
May 8, 2018
Messages
2
Hi, I'm trying to develop a timesheet that will round to the nearest 30 minutes and I can't figure out what to use for a formula. Can anyone please help me? First time posting and any I'm looking for any help I can get. Please and thank you!!

1. * Rounding set to 30 minutes, an employee clocking in between 8:00AM and 8:29AM will have their time rounded down to 8:00 AM.
2. * Rounding set to 30 minutes, an employee clocking in between 8:30AM and 9:00 AM will have their time rounded up to 9:00AM.
All time should be rounded to thirty minute increments (i.e. 8:30, 9:00, 9:30 and 10:00AM). When totaling the number of hours for each day, they should be in increments of 30 minutes (30 minutes = .5 hours and 60 minutes = 1 hour).

This can be done per day, week, or two weeks as the time sheet is bi-weekly.

i.e.
If someone works 7:40am - 5:02pm, this is a 9 hour work day.
If someone works 7:30am - 5:15am, this is a 9.5 hour work day.
If someone works 7:45am - 5:15am, this is a 10 hour work day.
Etc....

Thank you!
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Welcome to the forum.

I think this should help. For the sample you provided for someone who works 7:45am - 5:15am, this is a 9-hour work day for him, not 10 I think.

Note that this algorithm does not contemplate calculations for an employee who might work past midnight. For example, if he starts at 10:00 PM and finishes at 7:00 AM the next day, we will need to use a different method to calculate his hours.


Book1
ABCDEF
1Time Format
2StartStopStart_RoundedStop_RoundedDaysHours
37:40:00 AM5:02:00 PM8:00:00 AM5:00:00 PM0.3759.00
47:30:00 AM5:15:00 PM7:30:00 AM5:00:00 PM0.3969.50
57:45:00 AM5:15:00 PM8:00:00 AM5:00:00 PM0.3759.00
67:29:00 AM5:31:00 PM7:00:00 AM6:00:00 PM0.45811.00
Sheet65
Cell Formulas
RangeFormula
C3=IF(MINUTE(A3)>=30,CEILING(A3,"00:30"),FLOOR(A3,"00:30"))
D3=IF(MINUTE(B3)>=30,CEILING(B3,"00:30"),FLOOR(B3,"00:30"))
E3=D3-C3
F3=E3*24
<strike>
</strike>
 
Last edited:
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