Note the result will be zero if total time = regular time. We simply subtract regular time from total hours to get overtime. To calculate OT (overtime), G5 contains: =E5-F5 The result is the smaller of two options: 8 hours, or regular time as calculated above. This is an example of using MIN instead of IF to simplify. To calculate regular time, F5 contains: =MIN(8,E5) If you need to calculate elapsed time that crosses midnight, see this page for options and general explanation. This is simply end time minus start time, multiplied by 24 to convert to decimal hours. To calculate total hours worked, cell E5 contains: =(D5-C5)*24 In the example shown on this page, we capture time in native units, but then convert to decimal hours in column E. This works fine for standard time and date calculations, but in many cases you'll want to convert times to decimal hours to make other calculations more straightforward. Note: it's important to understand that Excel deals with time natively as fractions of a day.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |