CodingExcel Badness

 

Press Ctrl+Enter to quickly submit your post
Quick Reply  
 
 
  
 From:  Queeg 500 (JESUSONEEZ)  
 To:  ALL
32248.1 
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!
0/0
 Reply   Quote More 

 From:  Queeg 500 (JESUSONEEZ)  
 To:  Queeg 500 (JESUSONEEZ)     
32248.2 In reply to 32248.1 
S'alright...ignore me...using VLOOKUP and working fine.
0/0
 Reply   Quote More 

Reply to All    
 

1–2

Rate my interest:

Adjust text size : Smaller 10 Larger

Beehive Forum 1.5.2 |  FAQ |  Docs |  Support |  Donate! ©2002 - 2024 Project Beehive Forum

Forum Stats