How can I compare more than 7 items in a conditional statement?

I

if'd out

I'm using Excel and trying to test items in conditional "if" statements for a
payroll worksheet with about 20 steps to test. Excel will only allow 7
nested "if's". Is there a way to override this limit or another way to
accomplish what I need?
 
R

Roger Govier

Hi

There are techniques to get around the 7 level nesting limit in Excel,
but you would probably be better served by having a lookup table.

Post some more details about what you are trying to achieve, and someone
will be able to help you.
 
I

if''d out

Thanks for the response Roger. I have about 20 steps in the salary schedule
which gives a different annual raise based on the step. As a simple
illustration, moving from step 0 to step 1 gives the employee a $100 per year
raise. From step 1 to step 2 gives a $200 raise, step 2 to step 3 a $300
raise, etc. to step 20. With all employees set up in an Excel spreadsheet, I
am wanting my formula to read the step level of each employee and increase
the pay of each employee by the appropriate amount according to the
employee's step for the next year's budget prepartation. A lookup table
might be more appropriate but I have never used one and don't know where to
start.
 
R

Roger Govier

Hi

If your steps were exactly as you say throughout the range, then you
wouldn't need IF's or Vlookup's but I suspect they don't follow an
exactly linear increment from 1 to 20.

Set up a table in A1:B20
0 0
1 100
2 200
..
..
20 1200

Then with the step value in D1
=VLOOKUP(D1,$A$1:$B$20,2)

The table can be placed anywhere, even on another sheet and would be
better if it were a named range.
Insert>Name>Define> Name Salaries Refers to
=Sheet2!$A$1:$B$20

then
=VLOOKUP(D1,salaries,2)
 

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

Top