Reputation: 161
I checked throughout the site and didn't see anything exactly matching what I'm looking for.
I have a set of values in Column A and Column B
I want Column C to report text string Z IF the values in Column A match text string X and Column B matches text string Y.
Here's an example.
Col A Col B Col C
Apple Banana Not a Match
Apple Banana Not a Match
Apple Banana Not a Match
Apple Banana Not a Match
Apple Strawberry Match
Apple Strawberry Match
Apple Strawberry Match
Orange Banana Not a Match
Orange Banana Not a Match
Orange Banana Not a Match
Orange Grapefruit Not a Match
Orange Grapefruit Not a Match
Orange Grapefruit Not a Match
I want to be able to have the 3rd column automatically report a text string (that I will specify) in column C ONLY if Column A AND Column B matches the values I enter. In this example, a match is reported ONLY if Column A = Apple AND Column B = Strawberry.
Is this something that can easily be done?
Upvotes: 2
Views: 68
Reputation: 43585
Here is the formula that you need:
=IF (AND(A1="a";B1="b");"match";"not match")
And here is a good reference for IF AND in excel: http://www.experiglot.com/2006/12/11/how-to-use-nested-if-statements-in-excel-with-and-or-not/
Upvotes: 1