返回列表 发帖

Excel-EOS calculat.

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...

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)



Edited 1 time(s). Last edit at Saturday, April 30, 2011 at 09:44AM by bchadwick.

TOP

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!



Edited 2 time(s). Last edit at Saturday, April 30, 2011 at 01:46AM by Abokhaled.

TOP

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.

TOP

Before people here volunteer to do your homework you should at least show what you've come up with so far.

-------------------------------------------------------------------------------------

"Without American production the United Nations could never have won the war."
-Joseph Stalin, Tehran Conference: 1943

TOP

返回列表