Pension computation

  • Thread starter Thread starter owen.cxy
  • Start date Start date
O

owen.cxy

Hi, i have 2 categories of conditions to fufil in order to compute pension
contribution. One is age and the other is the salary.

for e.g. let x=age and y=salary & "< is less than" & "> is more than" & "<=
is less than or equal to" & "=> is more than or equal to"

Below is an e.g. of 2 ranges of Age and 1 range of salary
if (X <= 35) AND (Y <= 50), contribution will be 0
if (X <= 35) AND (50 <= Y < 500), contribution will be 1.25 of Y

if (35 < X <=50) AND (Y <= 50), contribution will be 0
if (35 < X <=50) AND (50 <= Y < 500), contribution will be 0 of Y

The problem now is that i have 6 ranges of Age and 6 ranges of Salary, how
do i do it? I was thinking of using =IF() but i do not know how to stack so
many range of these 2 categories AGE and Salary.
 
use the SELECT .... END SELECT method ....much easier to use and clearer
than a series of IF statements

SELECT CASE TRUE
CASE (X <= 35) AND (Y <= 50)
'do something
CASE (X <= 35) AND (50 <= Y ) AND ( Y < 500)
'do something
....etc etc

CASE ELSE
'no fit ... do something

END SELECT
 
but i'm using ms excel, how do i use that function? do you have a full e.g.
of how i can do it?
 
Back
Top