Sam Patterson
New Member
Hi and thankyou to all in advance.
The problem is as follows, I have been working on time sheet to calc pay.
Example 1 - If a person starts shift on 15/10/11 at 17:00 and works to 15/10/11 23:00 then the time he works falls in to a bonus period 20:00 to 23:00 i.e. he has worked 6hrs and 3 hrs of which are at a special bonus.
I have used cells for start date w23, start time x23, finish date y23, finish time z23, bonus1 start time ah2, bonus1 finish time ah3, using the following formula
=IF(OR(Z23+Y23<=$AH$2+W23,$AH$3+W23<=X23+W23),"00.00",MIN(Z23+Y23,$AH$3+W23)-MAX(X23+W23,$AH$2+W23)) which seems to work fine to calculate the hours worked in the bonus period.
The problem comes when I try to use the formula to work out the second bonus period which is from 23:00 to 06:00 the next day. The cells used for bonus2 start time aj2, finish time ak3 are used instead of ah2 and ah3 and just changed in the formula.
I cannot get it to work properly because it crosses midnight
Would appreciate some help I am not an expert so forgive me if I ask some questions (formula used from previous question answers on this site)
Thanks
The problem is as follows, I have been working on time sheet to calc pay.
Example 1 - If a person starts shift on 15/10/11 at 17:00 and works to 15/10/11 23:00 then the time he works falls in to a bonus period 20:00 to 23:00 i.e. he has worked 6hrs and 3 hrs of which are at a special bonus.
I have used cells for start date w23, start time x23, finish date y23, finish time z23, bonus1 start time ah2, bonus1 finish time ah3, using the following formula
=IF(OR(Z23+Y23<=$AH$2+W23,$AH$3+W23<=X23+W23),"00.00",MIN(Z23+Y23,$AH$3+W23)-MAX(X23+W23,$AH$2+W23)) which seems to work fine to calculate the hours worked in the bonus period.
The problem comes when I try to use the formula to work out the second bonus period which is from 23:00 to 06:00 the next day. The cells used for bonus2 start time aj2, finish time ak3 are used instead of ah2 and ah3 and just changed in the formula.
I cannot get it to work properly because it crosses midnight
Would appreciate some help I am not an expert so forgive me if I ask some questions (formula used from previous question answers on this site)
Thanks