Multiple IFs in a function...

Wayne Contello Austin, Texas

Like (0)


Thanks, Wayne. I also tried it this way (with help on the "AND" part):
=IF(C3<=5%,30%,IF(AND(C3>5%,C3<=10%),40%,IF(AND(C3>10%,C3<=15%),50%,60%)))

Like (0)


Wayne Contello Austin, Texas

Like (0)


Wayne Contello Austin, Texas

Like (0)


Thanks, Wayne. Much better solution for this application.

Like (0)


Hi Equius,
Agreed that the VLOOKUP soution suggested by Wayne is the better one in this situation.
As an aside, though, your equation using nested IFs could be simplified as well, as there's no need for the use of AND.
The second IF, where the conditions are C3 > 5% AND C3 <=10% will be reached only if C3 > 5%. Since that will always be TRUE at this point, there's no need to retest it.
Original: =IF(C3<=5%,30%,IF(AND(C3>5%,C3<=10%),40%,IF(AND(C3>10%,C3<=15%),50%,60%)))
Revised: =IF(C3<=5%,30%,IF(C3<=10%,40%,IF(AND(C3<=15%),50%,60%)))
To exactly match the results for the VLOOKUP solution, this further revision is needed:
Revised2: =IF(C3<5%,30%,IF(C3<10%,40%,IF(AND(C3<15%),50%,60%)))
Wayne's demonstration of the increasing complexity of the nested IF formula (and consequent increasing probability of making an error in editing the formula) still applies, though.
Regards,
Barry

Like (0)
