I want calculate end of service benefit using IF functions. The rules are as follows: The first 5 years gets half salary for each year. > 5 years gets one full salary each year. any thought…
Before people here volunteer to do your homework you should at least show what you’ve come up with so far.
i agree with black swan. you should at least show what effort you’ve put in instead of asking others to solve it for you. hope this helps: YoS - Years of Service Sal - Annual Salary =IF(YoS>5, 2.5*Sal+(YoS-5)*Sal, YoS*Sal/2) if this isn’t what you need, then show us what you’ve come up with.
Guys we have a system generates the EOSB which you give it the input and shows you the output! I want use the IF funct instead of counting on the system plus for double checking purposes! I’ll try yours droopie and see if works. Thanks to both of you!
You can also use MIN for this one: EOS = YoS*Sal - MIN(5,YoS)*(Sal/2) Gives you a salary for each year of service, but removes 1/2 of it for each of the first five years. No IF, AND, or BUTs. You will need IF if the rules mean that a 6 year worker gets 6 years at full salary and not 5 years of half salaries and 1 year at full (though you might be able to substitute a boolean (YoS<=5) for the MIN term and have it work like that)