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.
CodePudding user response:
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")
CodePudding user response:
use:
=SUMPRODUCT(FILTER(A31:F; A30:F30="Anna")="blue")