excel_noob
excel_noob

Reputation: 63

Is there a for loop in excel?

+---+-----+
| A | Inc |
+---+-----+
| A | Exc |
+---+-----+
| B | Exc |
+---+-----+
| B | Exc |
+---+-----+

This is the table I have, I have created a column of unique values in the first column (A,B)

Now if the rows with A have even one Include I want the add a column next to the Unique value column that says include. If there are no Includes it should be exclude. So it should look like this -

+---+-----+
| A | Inc |
+---+-----+
| B | Exc |
+---+-----+

Upvotes: 0

Views: 218

Answers (1)

Scott Craner
Scott Craner

Reputation: 152605

Use COUNTIFS()

=IF(COUNTIFS(A:A,E1,B:B,"Inc"),"Inc","Exc")

enter image description here

Upvotes: 3

Related Questions