rounding question

joshisms

New Member
Joined
Aug 2, 2013
Messages
14
I want to round to the quarter hour based on 7/8 minute split. I found two formulas. Is one better than the other? Any known issues using one versus the other? They both seem to work ok.

ActiveCell.FormulaR1C1 = "=ROUND(RC[-1]*96,0)/96"

ActiveCell.FormulaR1C1 = "=TIME(HOUR(RC[-1]), ROUND((MINUTE(RC[-1])/60)*4, 0) * 15, 0)"


EXAMPLE ROUNDING:
7:53 - 8:07 rounded to 8:00
8:08 - 8:22 rounded to 8:15
8:23 – 8:37 rounded to 8:30
8:38 – 8:52 rounded to 8:45
8:53 – 9:07 rounded to 9:00
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes

Forum statistics

Threads
1,215,094
Messages
6,123,071
Members
449,092
Latest member
ipruravindra

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