jeudi 5 mars 2015

excel: how to work around max number of nested if statements?

I have the following if statement in cell A1 which checks my cell W7 for values between the specified numbers:


my cell W7 can have a value from as high as 525 to as low as 0:



0 - 525


The higher the value in my cell W7 the less the value in my cell A1 where my If statement is.


What I have at the moment is a working if statement. This checks my value in the w7 cell upto the amount of 300 which then shows the number 40 in my cell a1.


here is my existing if statement:



=IF(Dashboard!W7=0, 100, IF(AND(Dashboard!W7>= 0, Dashboard!W7<50), 90, IF(AND(Dashboard!W7>=50, Dashboard!W7<100), 80, IF(AND(Dashboard!W7>=100, Dashboard!W7<150), 70, IF(AND(Dashboard!W7>=150, Dashboard!W7<200), 60, IF(AND(Dashboard!W7>=200, Dashboard!W7<250), 50, IF(AND(Dashboard!W7>=250, Dashboard!W7<300), 40)))))))


However, I need to carry on this sequence by adding the rest of my if statements:



IF(AND(Dashboard!W7>=300, Dashboard!W7<350), 30, IF(AND(Dashboard!W7>=350, Dashboard!W7<400), 20, IF(AND(Dashboard!W7>=400, Dashboard!W7<450), 10, IF(AND(Dashboard!W7>=450, Dashboard!W7<525), 0))))


the problem I have is when I combine the last of my if statements to my existing if statement, I get a max number of nested if statements reached error. Can anyone please show me a way of working around this? Thanks in advance


Aucun commentaire:

Enregistrer un commentaire