ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Help with calculating time and a half - I've got straight time and double time. (https://www.excelbanter.com/excel-discussion-misc-queries/449094-help-calculating-time-half-ive-got-straight-time-double-time.html)

Paxton31

Help with calculating time and a half - I've got straight time and double time.
 
Hello,
I am having a little, okay, a lot, of trouble figuring out how to calculate time ad a half when it comes to wages.

Straight time is up to 8 hours
Time and a half between 8 and 12 hours
Double time - any hours after 12

Cell G2 is the issue. It ends up showing me all hours after 8, but what I really want is hours between 8 and 12.

B2 - In
C2 - out
D2 - In
E2 - Out
F2 - Regular time =IF((((C2-B2)+(E2-D2))*24)8,8,((C2-B2)+(E2-D2))*24)
G2 - Time and a half = =IF(((C2-B2)+(E2-D2))*248,((C2-B2)+(E2-D2))*24-8,0)
H2 - Double time =IF(((C2-B2)+(E2-D2))*2412,((C2-B2)+(E2-D2))*24-12,0)

Any help would be really appreciated. I hope it doesn't sound too confusing.

Thank-you

joeu2004[_2_]

Help with calculating time and a half - I've got straight time and double time.
 
"Paxton31" wrote:
Straight time is up to 8 hours
Time and a half between 8 and 12 hours
Double time - any hours after 12

[....]
B2 - In
C2 - out
D2 - In
E2 - Out
F2 - Regular time
G2 - Time and a half
H2 - Double time


F2: =MIN(8,(C2-B2+E2-D2)*24)
G2: =MIN(4,(C2-B2+E2-D2)*24 - F2)
H2: =(C2-B2+E2-D2)*24 - F2 - G2

Note: I assume that B2, C2, D2 and E2 have date and time, or midnight does
occur between B2 and C2 or between D2 and E2. Right?


Paxton31

Yes, you assume correctly. :) That's Time in, Time out. Thanks for clarifying.


Note: I assume that B2, C2, D2 and E2 have date and time, or midnight does
occur between B2 and C2 or between D2 and E2. Right?[/quote]

joeu2004[_2_]

Help with calculating time and a half - I've got straight time and double time.
 
Errata.... I wrote:
"Paxton31" wrote:
F2: =MIN(8,(C2-B2+E2-D2)*24)
G2: =MIN(4,(C2-B2+E2-D2)*24 - F2)
H2: =(C2-B2+E2-D2)*24 - F2 - G2

Note: I assume that B2, C2, D2 and E2 have date and time, or midnight
does occur between B2 and C2 or between D2 and E2. Right?


I meant to write: "or midnight does __not__ occur between" the time-in and
time-out times.

The point is: if the cells contain only time and the shift spans midnight,
the calculations will not be correct. But it is consistent with your
original calculations.


Paxton31

Quote:

Originally Posted by joeu2004[_2_] (Post 1613070)
Errata.... I wrote:
"Paxton31" wrote:
F2: =MIN(8,(C2-B2+E2-D2)*24)
G2: =MIN(4,(C2-B2+E2-D2)*24 - F2)
H2: =(C2-B2+E2-D2)*24 - F2 - G2

Note: I assume that B2, C2, D2 and E2 have date and time, or midnight
does occur between B2 and C2 or between D2 and E2. Right?


I meant to write: "or midnight does __not__ occur between" the time-in and
time-out times.

The point is: if the cells contain only time and the shift spans midnight,
the calculations will not be correct. But it is consistent with your
original calculations.

Thank-you, so, so much. Brilliant! It works perfectly. :)


All times are GMT +1. The time now is 02:46 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com