Pension computation

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

Patrick Molloy

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
 
O

owen.cxy

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top