Rounding to the nearest quarter hour

Myrdrai

New Member
Joined
Feb 18, 2005
Messages
7
I'm using a template I found for employee timesheets and it works well but there is just one problem how do I get it to calculate the hours to the "nearest quarter hour"

EDIT: Sorry, I didn't read the guidelines before posting ;)

Using Excel 2003, on Windows XP


Code:
=ROUND(IF((OR(B12="",C12="")),0,IF((C12<B12),((C12-B12)*24)+24,(C12-B12)*24))+IF((OR(E12="",F12="")),0,IF((F12<E12),((F12-E12)*24)+24,(F12-E12)*24)),2)

I know literally Nothing about this so I have no idea what I'm even looking at.

Thanks for all your time and patience
 
Also, choose the Tools | Options... menu command's Error Checking tab, and right-click on the "Inconsistent formula in region" check box label.
 
Upvote 0

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
ok I understand that but, the problem is that it doesnt show the correct calculations for the total hours.

For example, it should round 7.17 hours up to 7.25 or 7.33 down to 7.25
testsheet.xls
ABCDEFGHIJK
8Weekly Employee Time Sheet
9
10Day of WeekTime InTime OutMealTime InTime OutTotal HrsRegular HrsOvertime HrsSick HrsVacation Hrs
11Sunday 
12Monday8:00 AM11:33 AM12:07 PM5:00 PM8.508.00
13Tuesday9:00 AM12:00 PM1:00 PM5:10 PM7.177.17
14Wednesday9:00 AM12:00 PM1:00 PM5:20 PM7.337.33
15Thursday 
16Friday 
17Saturday 
18Total:22.50   
19Rate:$8$12$8$8
20Total ($):180.00---
TimeSheet
 
Upvote 0
oh good god, it would help if I actually changed the code for the rest of the week lol

I'm really sorry about the confusion, thanks for all your help, I really appreciate it :)
 
Upvote 0
Myrdrai said:
ok I understand that but, the problem is that it doesnt show the correct calculations for the total hours.

For example, it should round 7.17 hours up to 7.25 or 7.33 down to 7.25

As it should...

7.17 hours is equivalent to 7 hrs 10 min 12 sec which is closer to 7:15 (7.25 hours)
7.33 hours is equivalent to 7 hrs 19 min 49 sec which is closer to 7:15 (7.25 hours)
 
Upvote 0

Forum statistics

Threads
1,215,045
Messages
6,122,840
Members
449,096
Latest member
Erald

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