Loading

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.

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.

Learn more about Allen...

ExcelTips FAQ

ExcelTips Resources

Ask an Excel Question

Make a Comment

Free Business Forms

Free Calendars

** 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),

Lisa is trying to set up a timesheet. It needs to go by the seven-minute rule. If it is 7 minutes till the hour it rounds to, say, 8:00 am; if it is 10 till it rounds to 7:45. If it is 7 minutes after it would be 8:00, and 8 minutes after would be 8:15 am. In other words, whatever time is entered needs to be rounded to the nearest quarter hour.

The full name of the rule that Lisa mentions is the "7/8 minute rule." It's a throwback to when timecards were processed manually. Depending on the particular time clock, the rule may not have the same result as quarter-hour rounding. Consider that the 7/8 rule rounds down all the way to 7 minutes and 59.9 seconds whereas quarter-hour rounding rounds down only to 7 minutes and 29.9 seconds. It's not a huge difference, but the 7/8 minute rule in a payroll context gives employers a 30 second freebie.

If Lisa is only entering hours and minutes, then quarter-hour rounding is just fine. This can be handled in a number of different ways. For instance, you could create a lookup table that shows what the rounded time would be for each time within the hour, and then—based on the number of minutes in the original time—use VLOOKUP (or one of the other lookup functions) to determine the correct minutes.

A better way, however, is to remember that Excel stores times as a fraction of a day, so to convert any given time to minutes you simply multiply a time value by the number of minutes in a day (24 * 60 = 1440). You can then divide by the desired time interval, in this case 15. This means that you can use any of the following equivalent formulas, if the time you want to round is in cell A1:

=ROUND(A1*(24*60/15),0)/(24*60/15) =ROUND(A1*(1440/15),0)/(1440/15) =ROUND(A1*96,0)/96

If you prefer, you can also "reverse" the formula by using any of these equivalent formulas:

=ROUND(A1/(15/(24*60)),0)*(15/(24*60)) =ROUND(A1/(15/1440),0)*(15/1440) =ROUND(A1/0.01041667,0)*0.01041667

If you have the Analysis ToolPak enabled on your system, you could also use the MROUND function to determine the rounded time. The following are equivalent formulas that use the MROUND function:

=MROUND(A1,15/60/24) =MROUND(A1,0.25/24) =MROUND(A1,0.01041667)

If you are not comfortable figuring out the number that Excel uses to represent 15 minutes (as is done in these formulas), you could combine MROUND with the TIME function, in this manner:

=MROUND(A1,TIME(0,15,0))

As mentioned, all the formulas presented so far assume that seconds are not being entered into the original value. If they are being entered and you want to use the 7/8 rule exactly (favoring the employer for that half minute), then you need to use an adapted formula, in this manner:

=ROUND((A1*1440-0.5)/15,0)*(15/1440)

*ExcelTips* is your source for cost-effective Microsoft Excel training. This tip (9359) 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 to the Nearest Quarter Hour.

*Related Tips:*

**Comprehensive VBA Guide** Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out *Mastering VBA for Office 2010* today!

ANY FORMULA I PUT IN GIVES ME A TIME OF 0.3542. HOW DO I MAKE IT TELL ME THE TIME? LIKE MY HOURS ARE IN AT 7:22 AM OUT AT 12:42 PM BACK IN AT 1:29 PM & BACK OUT AT 4:34 PM. GIVES ME 8 HOURS & 25 MIN. I WOULD LIKE IT TO GIVE ME ANSWER OF 8.5.

@Diana,

Check out the linked picture:

http://screenpresso.com/=q7dBd

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

Michael (Micky) Avidan

“Microsoft® Answers" - Wiki author & Forums Moderator

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

ISRAEL

Check out the linked picture:

http://screenpresso.com/=q7dBd

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

Michael (Micky) Avidan

“Microsoft® Answers" - Wiki author & Forums Moderator

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

ISRAEL

To Whom It May Concern:

I am trying to figure out how to do the following:

In A1 I have 9:00 AM in A2 I have 12:30 PM in A3 I have 1:30 and in A4 I have 6:30. A1 represent in time, A2 represents Lunch out, A3 represents Lunch in and A4 represent time out. The work day is 9 to 5. I must subtract the lunch, and I need to show 7 working hours and separately show hours overtime. The total hours have to be in hours and to the closest quarter hours, so that 1:50 is depicted as 9.45. Is there any way to achieve this in excel?

I am trying to figure out how to do the following:

In A1 I have 9:00 AM in A2 I have 12:30 PM in A3 I have 1:30 and in A4 I have 6:30. A1 represent in time, A2 represents Lunch out, A3 represents Lunch in and A4 represent time out. The work day is 9 to 5. I must subtract the lunch, and I need to show 7 working hours and separately show hours overtime. The total hours have to be in hours and to the closest quarter hours, so that 1:50 is depicted as 9.45. Is there any way to achieve this in excel?