Not really coding as such but still. I'm no programmer, and there are probably a million ways of doing this better, but i don't know how so meh.
Is there a limit in Excel to the number of nested IF statements you can have in a cell.
I had this;
=IF((AD6="Coast"),1,IF((AD6="Desert"),0,IF((AD6="Grassland"),2,IF((AD6="Snow"),0,IF((AD6="Ocean"),1,IF((AD6="Peak"),0,IF((AD6="Plains"),1,IF((AD6="Tundra"),1,""))))))))
It worked fine...I add another so it looks like this;
=IF((AD6="Coast"),1,IF((AD6="Desert"),0,IF((AD6="Grassland"),2,IF((AD6="Snow"),0,IF((AD6="Ocean"),1,IF((AD6="Peak"),0,IF((AD6="Plains"),1,IF((AD6="Tundra"),1,
IF((AD6="Fallout"),3,"")))))))))
Now it doesn't work, and highlights the "IF" I bolded above with the following error;
The formula you typed contains an error.
Descriptive huh?
So, is there a limit to nested IF statements and do I need to find another way of doing this?
Ta!
EDITED: 16 Apr 2007 12:09 by JESUSONEEZ