Please Note: This article is written for users of the following Microsoft Excel versions: 97, 2000, 2002, and 2003. If you are using a later version (Excel 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Excel, click here: Rounding Time.

# Rounding Time

by Allen Wyatt
(last updated February 25, 2019)

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, which is part of the Analysis ToolPak provided with Excel.

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 (perhaps you don't want to use the Analysis ToolPak), 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
```

Notice that this formula uses the ROUND worksheet function, which is intrinsic to Excel and doesn't require an add-in.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (2186) applies to Microsoft Excel 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) here: Rounding Time.

##### Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

##### MORE FROM ALLEN

Getting Pictures Out of Word

If you receive a Word document from someone, you may want to get any graphics it contains into their own files. You can ...

Discover More

Applying Styles

Styles are a powerful formatting tool for the text in your documents. Once you've created styles that describe how you ...

Discover More

Deleting Blank Columns

Import data from another program, and you could end up with a lot of blank columns in your data. Here's the quickest way ...

Discover More

Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!

##### More ExcelTips (menu)

Converting Time Notation to Decimal Notation

Want to convert an elapsed time, such as 8:37, to a decimal time, such as 8.62? If you know how Excel stores times ...

Discover More

Converting Numeric Values to Times

If you have a bunch of times entered into cells without the colon between the hours and minutes, chances are good that ...

Discover More

Dealing with Small Time Values

It is no secret that you can store time values in an Excel worksheet. But do you really know how small of a time value ...

Discover More
##### Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] in your comment text. Youâ€™ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is two minus 1?

2018-02-05 16:38:19

Andy Nguyen

Hi, i want to follow up from the instruction of adding Time Stamp onto Excel via VBA.

https://excelribbon.tips.net/T010635_Inserting_the_Current_Time_with_Seconds.html

If i want to use this MROUND in the VBA in a way that whenever I use the Time Stamp, it will automatically round it up to the nearest 15minutes. how would i write it in VBA. Please advise. Thank you

Best,

Andy

2016-02-25 04:59:28

Haytham

Hi,

If you please I would like to round up
85 seconds to the nearest minute
how can I do it using the excel ?

Regards,

2013-06-13 14:16:13

Darrell E

This tip worked perfectly! I had to separate a date/time format into date and time, then rounded the time to the nearest hour using =mround(B7, time(0,60,0)), then recombined the date and time into date/time for a lookup. Thank you for the tip!

##### This Site

Got a version of Excel that uses the menu interface (Excel 97, Excel 2000, Excel 2002, or Excel 2003)? This site is for you! If you use a later version of Excel, visit our ExcelTips site focusing on the ribbon interface.