You are here:

Excel/Formula to calculate and round time worked.

Advertisement


Question
Richard,

I need help with a formula for my employees timesheeet / timeclock spreadsheet. I'd like to enter start time in B1, end time in C1, and have total hours worked rounded to the quarter hour in D1. Also, if possible I'd like to add 20 minutes of paid lunch to any hours totaling 7.5 or more.

Example 1: (B1)8:30am (C1)4:30pm (D1) would = 8 plus 20 min lunch then rounding to quarter hour would make answer 8.25

Example 2: (B1)8:30am (C1)2:39pm (D1)6.25 (6 hours 9 minutes worked would round to 6.25 and since under 7.5 hours no paid lunch added.

THANKS!

Answer
See this tutorial on CALCULATING THE DIFFERENCE BETWEEN TWO TIMES.

Then you could use an IF FUNCTION to add on 20 minutes if you want.


Be sure to visit my web site and watch my FREE 90-minute Microsoft Excel Video Tutorial

Cordially,
Richard Rost
599CD Computer Training

About Excel
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here

Excel

All Answers


Answers by Expert:


Ask Experts

Volunteer


Richard Rost

Expertise

I am the author of The Complete Idiot's Guide to Excel 2010.
 
I am happy to answer any questions about Microsoft Excel. If you have an Excel problem, let me help you with it. Also, please be sure to check the Excel Tips & Tricks and Excel Tutorials sections of my web site.
 
You can also watch my complete Excel 2010 For Beginners tutorial online which is over 90 minutes of FREE videos and an eBook.

Experience

I have been using Microsoft Excel since the very early Windows 3.1 versions. I have been teaching Microsoft Excel in the classroom since 1994, and online through computer tutorials since 2002.

Organizations
I have been volunteering on AllExperts in the categories of Microsoft Access, Visual Basic, and Weight Loss for years.

Publications
I am the author of The Complete Idiot's Guide to Excel 2010. I have created a line of computer tutorials online at www.ExcelLearningZone.com and www.599CD.com/Excel.

Education/Credentials
Personally, I am self taught. I've learned everything I know from books and trial & error. If I don't know the answer, I know how to find it.

Past/Present Clients
I have over 20,000 happy clients worldwide.

©2016 About.com. All rights reserved.