**Please Note: **
This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, 2016, 2019, and Excel in Office 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.

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 Office 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!

The primary method of rounding values is to use the ROUND function in your formulas. Here's an introduction to this ...

Discover MoreRounding is normally done so that values greater than or equal to .5 are rounded up and less than .5 are rounded down. ...

Discover MoreNeed to round a value by a power of 10? You can do it by using the ROUND function as described in this tip.

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

2015-11-12 08:25:50

Sheila

Thank you! I will try these formulas!

2015-11-11 20:53:06

Alex B

Thanks Michael.

2015-11-11 05:28:48

Michael (Micky) Avidan

Your solution works fine - however, I usually use a helper-table to allow the user to alter the values whenever is needed (different rounding) which is difficult while hard coded inside the formula (and impossible in your suggested formula).

If Sheila need the result in "Decimal time" (I, personally hate using "Decimal time") she can multiple my suggested formula by 24.

--------------------------

Michael (Micky) Avidan

“Microsoft® Answers" - Wiki author & Forums Moderator

“Microsoft®” MVP – Excel (2009-2016)

ISRAEL

2015-11-10 19:09:11

Alex B

I should have done this the first time but the formula reduces down to:-

=HOUR(D22)+0.25*ROUND(((MINUTE(D22)+2)/15),0)

2015-11-10 18:42:42

Alex B

Michael's lookup solution looks quite good.

Assuming you want to return hours and time in a decimal format, you could try this.

=HOUR(D22)+0.25*ROUND(((MINUTE(D22)+2)/60)/(15/60),0)

Where D22 was the time ie 8:06

Normal rounding would actually be at 8 mins (not 7) so I have added 2 to the mins. I then worked this out as a fraction of 15 mins, rounded it to give the number of quarters and then multiplied that by 0.25

It seems to work.

2015-11-10 07:27:03

Michael (Micky) Avidan

Try to adopt the suggested solution from the linked picture:

http://screenpresso.com/=3RLpb

--------------------------

Michael (Micky) Avidan

“Microsoft® Answers" - Wiki author & Forums Moderator

“Microsoft®” MVP – Excel (2009-2016)

ISRAEL

2015-11-09 16:29:36

Sheila

6-20 minutes = 25

21-35 minutes - 50

36-50 minutes = 75

51-59 minutes = 0

0 minutes - 0

2015-09-28 08:42:27

AC

Much appreciated.

AC

2015-09-27 15:07:09

Steve Adams

---

As stated this appears you want to have the year that corresponds to the date. If you only want the year to display, you can do that with a custom number format of "yyyy" without the quote marks.

If you need the year only for filtering or for functions, you can use either the TEXT function or the YEAR function "=TEXT(A1,"yyyy")" [returns text value] or "=YEAR(A1)[returns number value] (assuming the date is in cell A1).

If you truly want to round the date to the nearest year use: =IF(MONTH(A1)>6,YEAR(A1)+1,YEAR(A1)) [6/30/2015 rounds to year 2015 and 7/01/2015 rounds to year 2016).

Be sure that the cell is formatted appropriately. If the cell is formatted as a date, the value for a year only will not format as expected (e.g., year 2015 formatted as a date will show "7/7/1905."

2015-09-27 04:48:59

Alex B

You might need to elaborate on what you are trying to do, based on what you have written just using =Year(b5) where b5 is the date will give you the year.

2015-09-27 00:24:43

AC

I suppose I could filter for the year numeral within the date cell and then create another column field to contain just the year numeral.

Thanks for your help!

AC

2015-09-26 08:09:28

Michael (Micky) Avidan

The following shorter formula will also round the time, in cell B7, to the nearest quarter-hour:

=MROUND(B7,"0:15")

------------------------

Michael (Micky) Avidan

“Microsoft® Answers" - Wiki author & Forums Moderator

“Microsoft®” MVP – Excel (2009-2016)

ISRAEL

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 © 2020 Sharon Parq Associates, Inc.

## Comments