oceanhelper
oceanhelper

Reputation: 3

How do you use Countif with two matching criterias in Excel?

The current formula is =COUNTIF(Sheet2!C[-1],Sheet1!RC[-1])

Fruit   Color   Sold
Apple   Red     Yes
Shoe    Red     Yes

Fruit   Color   Count
Apple   Green   0
Apple   Red     2

The count should be "1" for red apples. How does the formula get fixed so the column "Fruit" also matches?

Upvotes: 0

Views: 55

Answers (1)

P.b
P.b

Reputation: 11468

With that notation you can use: =COUNTIFS(Sheet2!C[-1],Sheet1!RC[-1],Sheet2!C[-2],Sheet1!RC[-2])

Upvotes: 1

Related Questions