Limit on logical function

  • Thread starter Thread starter AJ
  • Start date Start date
A

AJ

I need to add 5 more conditions to my statement below. I have tried and I
can only enter 3 more before I get an error. Does anyone have any
suggestions for a work around or a better way to enter the formula?

=IF(AND(AH8<=10000,AH8>0),5,IF(AND(AH8>=10001,AH8<=25000),4,IF(AND(AH8>=25001,AH8<=50000),3,IF(AND(AH8>=50001,AH8<=100000),2,IF(AND(AH8=0),0,1)))))
 
Hi,

Somewhere out of the way creat a table with your threshold values and what
you want to return similar to the table below. I used A1 - B5

Then the formula
=VLOOKUP(AH8,A1:B5,2,TRUE)
For any number uo to 10000 this will return zero and at 10001 it starts
returning 5. Add all the thresholds you want but ensure the left column must
remain sorted ascending.

0 0
10001 5
25001 4
50001 3
100001 2


Mike
 

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

Mick & Clause & Experts Please help me on this issue one more time 13
Formula 4
srinivas 3
formula 2
Using IF Function 7
Logical functions 2
Vlookup question 7
If condition with text 3

Back
Top