I am trying to create a timecard that calculates hours and minutes based on actual times that I input into a cell.
To break this down:
Morning
7:00am (A1) to 12:10pm (B1) [both formatted as h:mm AM/PM] so the total hours is =(B1-A1), or 5:10 (C1), formatted as [h]:mm;
Afternoon
12:50pm (D1) to 3:25pm (E1) (both formatted as h:mm AM/PM) so the total hours is =(E1-D1), or 2:35 (F1), formatted as [h]:mm;
Now I want to add an overtime column (G1) that will subtract the [original hours] from the [original hours + the overtime hours], with the original MORNING hours always being 5:10 and the original AFTERNOON hours always being 2:35. So say I worked 2 hours of overtime in the afternoon, making cell (E1) 5:25 instead of 3:25. My total hours in (F1) would then be 4:35 instead of 2:35.
In my OT cell (G1), I used this formula:
=((C1)-"5:10")+((F1)-"2:35")
Essentially, this is taking the total hours in the AM (5:10), subtracting 5:10 since that is the original hours, which equals 0, since no OT hours were worked in the AM. In the afternoon, this formula takes the total hours in the PM (4:35), and subtracts 2:35, since 2:35 is the original amount of hours, which should equal 2:00 hours.
When I enter these figures into my spreadsheet, it will calculate the 2:00 hours, but if I try to drag and copy the formula, I get ####. It also won't add properly when I try to SUM all the OT cells.
Does anyone have ANY idea how to make this work? It's literally driving me insane.
Thanks!
Bookmarks