Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
We want to create a spreadsheet to record start and end times for our
employees but also giving us a total of hours worked excluding the 30 minute break. For example, an employee is scheduled to start at 8am and leave at 1pm. Using a simple time formula, this would give us 5 hrs, however, we want to automatically subtract the required 30 min break so that the schedule reflects total work hours of 4.50 - or 4:30. I need an =IF formula that would say if end time minus start time is greater than or equal to 5 hrs, then subtract 30 mins, otherwise give the total of end time minus start time. If I have all the fields formatted as numbers, I can make it work using two diff formulas: Column B = In time Column C = Out time Column D = Total hours worked =+C19-B19 Column E - formua subtracting .5 hrs =IF(C19-B19=5, C19-B19-0.5,D19) It was easier using two formulas than attempting to do it all in one. Column E gives me the answer of 4.5 hrs that I want. Now, how can I replace the formula using time? I even put :30 in a separate column (F) and tried =IF(C3-B3=5, C3-B3-F3, C3-B3) but that doesn't get me the correct answer either. I have even tried doing the formula as text with no luck. Any ideas from people far smarter than I?? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Formula for subtracting | Excel Discussion (Misc queries) | |||
Converting 1-60 minutes to quarter minutes in a formula | Excel Worksheet Functions | |||
Subtracting dates from formula | Excel Discussion (Misc queries) | |||
subtracting hours and minutes | Excel Worksheet Functions | |||
Formula for minutes to days:hours:minutes | Excel Discussion (Misc queries) |