I would like to count the non empty rows that meet specific criteria.
I have a very simplified version of my data in the table below (my table is much larger and is confined to excel). I can count the non empty cells that meet multiple criteria by using a sumproduct formula:
sumproduct((B1:F1=2014)*(A2:A6=”Yes”)*(B2:F6>0))
What I would like to do is count the non empty rows where certain criteria is met in row 1 and column A. So the count of the rows that satisfy Year = 2014 (row 1) and Criteria = Yes (column A) should produce 3. I need to count the rows once so I am not double counting when I aggregate the years.
[TABLE="width: 500"]
<tbody>[TR]
[TD]Criteria[/TD]
[TD]2014[/TD]
[TD]2014[/TD]
[TD]2015[/TD]
[TD]2015[/TD]
[TD]2016[/TD]
[/TR]
[TR]
[TD]Yes[/TD]
[TD]4[/TD]
[TD]2[/TD]
[TD][/TD]
[TD]3[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Yes[/TD]
[TD][/TD]
[TD]3[/TD]
[TD]8[/TD]
[TD]8[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]No[/TD]
[TD]3[/TD]
[TD][/TD]
[TD]6[/TD]
[TD][/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]No[/TD]
[TD]5[/TD]
[TD]7[/TD]
[TD][/TD]
[TD]1[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Yes[/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD]3[/TD]
[TD][/TD]
[TD]3[/TD]
[/TR]
</tbody>[/TABLE]
I have a very simplified version of my data in the table below (my table is much larger and is confined to excel). I can count the non empty cells that meet multiple criteria by using a sumproduct formula:
sumproduct((B1:F1=2014)*(A2:A6=”Yes”)*(B2:F6>0))
What I would like to do is count the non empty rows where certain criteria is met in row 1 and column A. So the count of the rows that satisfy Year = 2014 (row 1) and Criteria = Yes (column A) should produce 3. I need to count the rows once so I am not double counting when I aggregate the years.
[TABLE="width: 500"]
<tbody>[TR]
[TD]Criteria[/TD]
[TD]2014[/TD]
[TD]2014[/TD]
[TD]2015[/TD]
[TD]2015[/TD]
[TD]2016[/TD]
[/TR]
[TR]
[TD]Yes[/TD]
[TD]4[/TD]
[TD]2[/TD]
[TD][/TD]
[TD]3[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Yes[/TD]
[TD][/TD]
[TD]3[/TD]
[TD]8[/TD]
[TD]8[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]No[/TD]
[TD]3[/TD]
[TD][/TD]
[TD]6[/TD]
[TD][/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]No[/TD]
[TD]5[/TD]
[TD]7[/TD]
[TD][/TD]
[TD]1[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Yes[/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD]3[/TD]
[TD][/TD]
[TD]3[/TD]
[/TR]
</tbody>[/TABLE]