954,301 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Excel if statements

Is there a way to have multiple conditions using some sort of "or" so that I don't have to nest so many if statements?

I currently have cells like this:

=IF(E2 = "District1","North",IF(E2 = "District2","North",IF(E2 = "District3","North",IF(E2 = "District4","North","Not North"))))


I have tried using OR in two ways and neither work.

=IF(E2 = "District1" OR E2 = "District2" OR E2 = "District3" OR E2 = "District4","North","Not North")

=IF(E2 = "District1" OR "District2" OR "District3" OR "District4","North","Not North")


Is there some kind of "or" conditional or do I have to keep with my long winded nested ifs?

EDIT: It turns out I have too many nested If statements for Excel to handle. It seems Excel only accepts 8 nested IF statements (despite the help saying that I can have up to 64).

Borzoi
Posting Whiz
324 posts since Oct 2006
Reputation Points: 21
Solved Threads: 30
 
CimmerianX
Junior Poster
170 posts since Jul 2010
Reputation Points: 22
Solved Threads: 29
 

Ah yes, thank you. That has solved the problem.

Borzoi
Posting Whiz
324 posts since Oct 2006
Reputation Points: 21
Solved Threads: 30
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: