Select the product you need help with
XL: Rounding Numbers and Time to Specified MultiplesArticle ID: 32378 - View products that this article applies to. This article was previously published under Q32378 On This PageSUMMARY
The MROUND worksheet function returns a number that is rounded to a
specific multiple. However, MROUND requires that the Analysis ToolPak add-in be installed before the function is available. If you do not want to install the Analysis ToolPak, you can use the ROUND worksheet function instead.
MORE INFORMATIONRounding a NumberTo round a number to the nearest multiple of "x" by using ROUND in Microsoft Excel, use the following syntax:=ROUND(<value or reference>/x,0)*x A1: 17 B1: =ROUND(A1/5,0)*5 The following formula, which uses the MROUND function, rounds the number 1.58 to the nearest fractional multiple of 0.5: =MROUND(1.58,0.5) NOTE: The MROUND function is installed with the Analysis Toolpak add-in. To load this add-in after you install it, click Add-ins on the Tools menu. In the Add-ins dialog box, click to select the Analysis ToolPak check box. Rounding TimeTo round time to the nearest multiple of "x" by using ROUND in Microsoft Excel, use the following syntax:=ROUND(<value or reference>*24/x,0)*x/24 For example, the following formula, which uses the ROUND function, rounds the time 8:10 to the nearest quarter of an hour or the nearest 15 minutes:
=ROUND(TIMEVALUE("8:10")*24/0.25,0)*0.25/24
NOTE: You can refer to a cell address instead of using TIMEVALUE("8:05"), as in the following formula: A1: 8:10 B1: =ROUND(A1*24/0.25,0)*0.25/24 A1: 8:05 B1: =TIMEVALUE(HOUR(A1)&":"&MROUND(MINUTE(A1),15)) REFERENCES
For more information about the ROUND function, click Contents and Index
on the Help menu, click the Index tab in Excel Help, type the
following text round worksheet function
and then double-click the selected text to go to the "ROUND" topic. If
you are unable to find the information you need, ask the Office
Assistant.PropertiesArticle ID: 32378 - Last Review: November 16, 2006 - Revision: 1.2 APPLIES TO
|



Back to the top








