View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Dave O Dave O is offline
external usenet poster
 
Posts: 427
Default Specific hours worked between two time intervals

If I can suggest, look into the way Excel handles dates. Briefly, Excel treats each day as an integer number, and a time as a fraction of a day. If you type the formula =NOW() into a cell you'll get a date and timestamp: as I write this the date and time is 1/3/2013 11:09:46 AM, for instance. If you then format that cell to show a number, Excel's numeric equivalent is 41277.4651157407. The 41277 part refers to January 3; the decimal fraction is the elapsed portion of the day and gives the time. In your spreadsheet you may find it helpful to convert the date in one cell and the punch in / punch out time in another cell to these Excel equivalents. This will allow you to calculate the time worked, and whether the person qualifies for shift differential. It will also allow you to determine whether or not the person qualifies for shift differential.

Do the date and time already appear in your spreadsheet in Excel's date format, or is it text? You can test for this by going to another cell and entering
=K2 + 5
If K2 is in date format you'll see a date that's five days later; if it's text it will return an error. No worries if it's text, though, you can still convert text to the date format.