colinheslop1984
Board Regular
- Joined
- Oct 14, 2016
- Messages
- 129
- Office Version
- 2016
I'm creating a holiday tracker that has certain requirements and I'm stuck. I feel like the solution is something simple but I'm giving up and asking for help.
I'll do my best to explain...
Holidays are accrued at the rates you see in right most side of the table based on length of service.
Holiday is calculated as follows:
Accrual rate x contracted hours = annual hours
If starting part way through year then calculated as:
Annual hours / 52 x weeks left in year
So Joe for example:
would accrue 5.6 x 40 =224 hours , 224 / 52 x 48 = allowance
As length of service increases, so does Accrual as seen on the right of the table below.
For example Peter
Would accrue 36 week at rate of 6, but 16 weeks at 5.8
So 6x30 / 52 x 36 + 5.8x30 / 52 x 16
I need a formula to calculate this in the annual allowance column, the ones I've tried are not accurately calculating
Then I also want to calculate accrued to date, using current week in top left corner as a criteria
Can any one put me out of my misery and help
[TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD]Current week ->[/TD]
[TD]37[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Contracted hours[/TD]
[TD]start week[/TD]
[TD]length of service[/TD]
[TD]annual allowance[/TD]
[TD]accrued to date[/TD]
[TD][/TD]
[TD][/TD]
[TD]Accrual rate[/TD]
[TD]length of service[/TD]
[/TR]
[TR]
[TD]Joe[/TD]
[TD]40[/TD]
[TD]4[/TD]
[TD]0[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]5.6
[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]Peter[/TD]
[TD]30[/TD]
[TD]16[/TD]
[TD]2[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]5.8[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]6[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]6.2[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]6.4[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I'll do my best to explain...
Holidays are accrued at the rates you see in right most side of the table based on length of service.
Holiday is calculated as follows:
Accrual rate x contracted hours = annual hours
If starting part way through year then calculated as:
Annual hours / 52 x weeks left in year
So Joe for example:
would accrue 5.6 x 40 =224 hours , 224 / 52 x 48 = allowance
As length of service increases, so does Accrual as seen on the right of the table below.
For example Peter
Would accrue 36 week at rate of 6, but 16 weeks at 5.8
So 6x30 / 52 x 36 + 5.8x30 / 52 x 16
I need a formula to calculate this in the annual allowance column, the ones I've tried are not accurately calculating
Then I also want to calculate accrued to date, using current week in top left corner as a criteria
Can any one put me out of my misery and help
[TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD]Current week ->[/TD]
[TD]37[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Contracted hours[/TD]
[TD]start week[/TD]
[TD]length of service[/TD]
[TD]annual allowance[/TD]
[TD]accrued to date[/TD]
[TD][/TD]
[TD][/TD]
[TD]Accrual rate[/TD]
[TD]length of service[/TD]
[/TR]
[TR]
[TD]Joe[/TD]
[TD]40[/TD]
[TD]4[/TD]
[TD]0[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]5.6
[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]Peter[/TD]
[TD]30[/TD]
[TD]16[/TD]
[TD]2[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]5.8[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]6[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]6.2[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]6.4[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]