# Excel/overtime formula

Question

Time Sheet
I have a time sheet template that I am having trouble with.  My employees work long hours most days of the week.  occasionally they could have a four hour day in the middle of the week or several four hour days.  I am trying to separate reg. time vs. overtime.  if they work more than eight hours I would like it to show up in the OT column.  But I If they do not get 40 hours for the week there should be no OT.  B14:B20 are Monday-Friday, C14 is time in, D14 is time out, E14 is time in, F14 is time out, (lunch break), H14 is Regular time, I14 is overtime.

H14=((D14-C14)+(F14-E14))*24
H15=MAX(MIN(G15,8,40-SUM(\$G\$14:\$G14)),0)
H16=MAX(MIN(G16,8,40-SUM(\$G\$14:\$G15)),0)
H17""
H18""
H19""
H20""
This formula puts 8 hours in reg and extra in OT but it stops putting reg time after the reg and OT get to 40.  I would like it to show the OT each day but I want the reg time to get to forty.  Is there a way to make this happen?  Thank you in advance for the assistance!

Sorry it took so long to get back to you - I was away on vacation. I don't understand "...but I want the reg time to get to forty." What do yuo mean by that? Right now the total of the regular time is 25.5. Are you saying you want this to keep showing the values until the total reaches 40?
Please send sample wb to me directly at bobumlas@hotmail.com and use the subject "AllExpertsQ"
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

#### Bob Umlas

##### Expertise

I`m a Microsoft Excel MVP (Most Valuable Professional) and have been since the inception of the program in 1995. I can answer every kind of Excel question except: API, Importing/exporting to other programs (powerpoint, word,...) Also check out my in-person training link at http://www.thumbtack.com/ny/new-york/excel-training/

##### Experience

Worked with MS Excel since version 0.99 (on the Mac!). Was contributing editor to Excellence Magazine, having written >300 articles. John Walkenbach said of me "I finally met someone who knows as much about Excel as I do."

Publications
Excellence, The Expert, Microsoft

Education/Credentials
BA in math, Hofstra University, 1965

Awards and Honors
MVP
Led sessions for the Convergence 2004-2006 seminar on Excel tips & tricks