Krijn
Krijn

Reputation: 3

Count values in row where first column is value

I would like to create a formula that counts the times the column contains "blue" when the name is "Anna"

In this example that would be a total of 3.

Anna Krijn Fieke Anna Krijn Fieke
blue green blue green blue green
green blue green blue green blue
blue green blue green blue green

I've tried COUNTIFS, but couldn't get it to work because the name appears multiple times in the first row.

Upvotes: 0

Views: 130

Answers (2)

player0
player0

Reputation: 1

use:

=SUMPRODUCT(FILTER(A31:F; A30:F30="Anna")="blue")

enter image description here

Upvotes: 0

rockinfreakshow
rockinfreakshow

Reputation: 30079

the setup in the screenshot should be helpful in what the formula is aiming at:

=COUNTIF(IFERROR(FILTER({A2:F},A1:F1=H2)),I2)

or to place it more directly:

=COUNTIF(IFERROR(FILTER({A2:F},A1:F1="Anna")),"blue")

enter image description here

Upvotes: 1

Related Questions