Adrian has attended:
Excel VBA Introduction course
Excel VBA Intermediate course
Excel Intermediate course
Excel - Multiple IF/And formula
Hi
I am struggling to create a formula (assuming IF plus AND for mulitple criteria, ie:
Column A Column B Column C
Yellow 10
Red 20
Orange 5
Pink 5
Black 15
White 15
I would like a formula that states if Cell A2 states yellow, AND cell B2 states 10, if correct state 0, if not correct 1). This is simple enough, but I want the formula to also say, if it shows Red then it should be 20, Pink 15, Black 5 etc., again if correct state zero, if not state 1)
Therefore I need to embed these multiple IFs in to one formula to ensure column B matches A and if not then state 1.
If you could please help it would be much appreciated!!
RE: Excel - Multiple IF/And formula
Hi Adrian
If I've understood correctly you want column C to state the value if it is correct for that colour otherwise state 1.
In cell C2 type
=IF(And(A2="Yellow", B2=10),10,IF(And(A2="Red",B2=20),20,IF(And(A2="Orange", B2=5),5,IF(And(A2="Pink", B2=5),5,IF(And(A2="Black", B2=15),15,IF(And(A2="White", B2=15),15,1))))))
Hope that works!
Cheers
Doug Dunn
Best STL
I've attached a file with example.