Nested If Statements


Posted by Whitestar on February 08, 2002 2:29 AM

I know you can only nest seven If statements, but is there any way you can nest more. e.g up to sixteen.

Cheers

Posted by Computerfreaks on February 08, 2002 2:37 AM

could be a bit annoying but how about doing it in a couple of cells:

A1: =IF(B2=1,1,IF(B2=2,2,IF(B2=3,3,IF(B2=4,4,A2))))
A2: =IF(B2=5, 5, IF(B2=6,6,"-"))

this does work and is the only way I can think of



Posted by Aladin Akyurek on February 08, 2002 6:53 AM

Don't. In most cases the need for nesting many ifs can be resolved by using VLOOKUP.

============