Working with times in Excel

ccordner

Active Member
Joined
Apr 28, 2010
Messages
355
Good Afternoon, I have a slight problem.

I have a worksheet, showing start times, finish times and hours worked for each day of the week. At the end of the week, a separate cell tots up the total hours worked during the week.

If you imagine that cell C12 shows their shift start time for the week, Cells G12, H12....L12 (Sundays are different) are linked to show whatever C12 shows.

Cells G13, H13...L13 have a formula similar to this:

=IF(G12>0,G12+$C$15,"")

Where C15 shows that person's daily hours (Normally 7:00, 7:30, 7:47 or 8:45).

Cells G14, H14...L14 have a formula similar to this:

=IF(G12>0,IF(G13>G12,G13-G12,G13+(24-G12)),"")

Finally, Cell N12 has the formula:

=SUM(F14:L14)

All is well, even when the finish time is after midnight until somebody starting at, for example, 13:20, works overtime.

The system would show them finishing at 20:20, so this is manually overridden to 0:24, their actual finish time. Everything works fine, except Cell N12, which adds about 500 hours on!

Curiously, it doesn't do this if you type in "24:24" instead of "0:24", which is odd!

Any ideas why?

Chris
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Without analysing what you're doing, this just caught my eye:
Rich (BB code):
=IF(G12>0,IF(G13>G12,G13-G12,G13+(24-G12)),"")
... that's 24 days worth of time that I've highlighted ... surely that should be 1 ( 1 = 24 hours timeserial )?
 
Upvote 0

Forum statistics

Threads
1,224,505
Messages
6,179,152
Members
452,891
Latest member
JUSTOUTOFMYREACH

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top