# Time sheet help

#### rob4crib

##### New Member
 A B C D E F G H I 1 IN OUT REG HRS O/N HRS TOTAL 2 7:00 pm 7:00 am 5 7 12:00 AM 8:00 AM 12 2 7:00 pm 7:00 am 4 -8 12:00 AM 8:00 AM -1 -4

<tbody>
</tbody>
A IN TIME
B OUT TIME
C REG HRS
D OVERNIGHT HRS
E 12:00 AM FOR CALCULATION
F 8:00 AM FOR CALCULATION

C2 =IF(E2<a2,((e2-a2)*24)+24+g2,(e2-a2)*24)
D2 =IF(B2>F2,((F2-E2)*24),(E2-F2)*24)
G2 =IF(B2>F2,((B2-F2)*24),(B2-F2)*24)
H BLANK
I2 =SUM(C2,D2)

Here is what I’m trying to get done.
My job pays a different wage for overnight hrs. 12:00 AM (E) to 8:00 AM (F)

The 1st #2 is what I’m after
The 2nd#2 is what I’m getting

The above calculations work fine if I sign out 8:01 AM or later so I’m close but missing something for G2 an IF, OR, <, >, if G2 is less than 0, but I can’t seem to enter it properly. I will hide E<f<g<h when="" finished.

Suggestions anyone? I’m using Office 2003 but my 2003 book for Dummies is smarter then I am.
Thanks
Rob</f<g<h></a2,((e2-a2)*24)+24+g2,(e2-a2)*24)

Last edited:

### Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Hi
Your message doesn't seem complete. for example the formula C2 =IF(E2 D2 =IF(B2>F2,((F2-E2)*24),(E2-F2)*24) seems to be missing something where marked in red, and formula G2 =IF(B2>F2,((B2-F2)*24),(B2-F2)*24) has the same result no matter if B2>F2 is true or false.

I think the problem that you have identified can be fixed by changing a greater than > to greater than or equal to >= or changing less than < to less than or equal to <=

Replies
7
Views
264
Replies
131
Views
3K
Replies
2
Views
598
Replies
1
Views
434
Replies
4
Views
689

1,196,308
Messages
6,014,573
Members
441,828
Latest member
cofracr

### 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.

### Which adblocker are you using?

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

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