Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Rounding Time.
Written by Allen Wyatt (last updated March 13, 2021)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365
There may be instances when you need to round a time value. For instance, you may need to round some time to the nearest quarter-hour. One way to do this is to use the MROUND worksheet function.
For example, let's assume the unrounded time was in cell B7. You could then use the following formula to perform the rounding:
=MROUND(B7, TIME(0,15,0))
This formula relies, as well, on the use of the TIME worksheet function, which returns a time value (in this case, for 15 minutes).
If you don't want to use the MROUND function for some reason, there is another way you can round to the nearest 15 minutes. The clue is to remember that 15 minutes is 1/96th of a day. So to round to the nearest 15 minutes, take the time value, multiply it by 96, round it, and then divide it by 96.
For example, if the time value you wish to round is in cell E5, the following formula does the rounding very nicely:
=ROUND(E5*96,0)/96
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (11401) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365. You can find a version of this tip for the older menu interface of Excel here: Rounding Time.
Professional Development Guidance! Four world-class developers offer start-to-finish guidance for building powerful, robust, and secure applications with Excel. The authors show how to consistently make the right design decisions and make the most of Excel's powerful features. Check out Professional Excel Development today!
Do you need your numbers to be rounded to an even integer value? How you accomplish the task depends on the nature of the ...
Discover MoreExcel provides a variety of functions you can use to round values in any number of ways. It does not, however, provide a ...
Discover MoreWhen preparing financial reports, it may make your data easier to understand if you round it to the nearest multiple, ...
Discover MoreFREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)
Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2024 Sharon Parq Associates, Inc.
Comments