So quickly.. using your example
My first suggestion was to store the Years Service separately, eg:
K2:
=DATEDIF($C2,"31/12/2011","y")
copied down to K31
Then, to generate rates:
F2:
=IF(AND((RIGHT($D2)+0)=MATCH($K2,{0,4,7,13}),OR($B2={"Admin","Design","Production"})),INDEX(RATES!D$2:D$13,RIGHT($D2)+4*(MATCH($B2,{"Admin","Design","Production"},0)-1))*(1+0.008*($K2+(COLUMNS($F2:F2)-1)>=20)),"Error")
applied to matrix
which would for F2 generate 32,259.90 given 20 years service
(ie 1.008 of 32,003.87)
The above is adapted slightly from before in so far as reference to Rates becomes relative such that copied to the right in picks up the correct column... similarly the years service is incremented by one each year such that the increase occurs where appropriate.
(we only conduct the Gn = years service test for 2011 - thereafter the calculation is not viable)
You will note that rows 16:18 return Error - because years service (13) exceeds the G3 band (same issue re: 24:26 [should be G3] and 28 [should be G2])
Bookmarks