Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

excel multiple ifand

Forum home » Delegate support and help forum » Microsoft Excel Training and help » Excel - Multiple IF/And formula

Excel - Multiple IF/And formula

ResolvedVersion 2010

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.


Attached files...

testIF.xlsx

RE: Excel - Multiple IF/And formula

Hi

Thanks thats magic, appreciate your quick response and help!!

Adrian

Excel tip:

Reset Excel toolbars to default settings

If you find any of your toolbars in Excel have changed (i.e. they are missing or have extra buttons) then you can reset them to their defaults.

1. Go to Tools - Customise.
2. Select the Toolbars tab.
3. Select (highlight) the name of the toolbar you wish to reset, then click the Reset button on the right.
4. Close the dialogue box.

View all Excel hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.1 secs.