1) First we need to find out what dates are 24,12,6 months counted from the past of today's date:
EDATE(TODAY(),-{24,12,6})
with today = 28/2/2014, they are {41333,41698,41879} = {28/2/2013,28/2/2014,28/8/2014}
2)Then use LOOKUP to locate D2 position in deduction list:
LOOKUP(D2,EDATE(TODAY(),-{24,12,6}),{0.05,0.03,0.015})
with D2=27/11/2014, evaluate:
LOOKUP(D2,{28/2/2013,28/2/2014,28/8/2014},{0.05,0.03,0.015})
results: 0.03
3)define total amount of deduction: Gross salary * deduction rate:
K2*LOOKUP(D2,EDATE(TODAY(),-{24,12,6}),{0.05,0.03,0.015})
4)Basic salary is deducted 80% on total amount of deduction
K2*LOOKUP(D2,EDATE(TODAY(),-{24,12,6}),{0.05,0.03,0.015})*0.8
5) New basic salary after deduction:
H2-K2*LOOKUP(D2,EDATE(TODAY(),-{24,12,6}),{0.05,0.03,0.015})*0.8
6)For employees who is over 2 years pass, it should returns unchanged:
=IFERROR(H2-K2*LOOKUP(D2,EDATE(TODAY(),-{24,12,6}),{0.05,0.03,0.015})*0.8,H2)
That is how my formular works. I wonder if the final results is correct?
Bookmarks