if statement - Excel advanced multiple conditions formula -


i need write if in excel multiple conditions.

basically, need excel return me this:

if cr2=>2 , ci2=>2 , ch2=>2 should return 1

if cr2=>2 , ci2=>2 , ch2=1 should return 2;

if cr2=>2 , ci2=1 , ch2=>2) should return 2;

if cr2=>2 , ci2=1 , ch2=>1 should return 3;

if cr2=1 , ci2=1 , ch2=1 should return 4.

i've been trying right no success , think problem due fact don't know how can right false statements in case.

any appreciated. thank you!

you make big, ugly, nested-if-and statement , figure out how want deal other possible scenarios (unless don't happen in data).

=if(and(cr2>=2,ci2>=2,ch2>=2), 1,  if(and(cr2>=2,ci2>=2,ch2=1), 2, if(and(cr2>=2,ci2=1,ch2>=2), 2, if(and(cr2>=2,ci2=1,ch2>=1), 3, if(and(cr2=1,ci2=1,ch2=1), 4, "some other thing happened")))))) 

Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -