Counting Non Empty ROWS based off of multiple criteria

spoloms1

New Member
Joined
Jul 17, 2015
Messages
2
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.
Criteria20142014201520152016
Yes423
Yes3882
No364
No571
Yes1133

<tbody>
</tbody>
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
=COUNTIF(E13:E17,"=yes")+COUNTIF(F12:J12,"=2014")

Adjust references to suit your data. Let me know if this is what you want.


Edit: Nvm, I have reread your post and I understand what you are looking for now. I will adjust the formula.
 
Upvote 0
Row\Col
A​
B​
C​
D​
E​
F​
G​
H​
I​
1​
Criteria
2014​
2014​
2015​
2015​
2016​
2014​
2​
Yes
4​
2​
3​
Yes
3​
3​
Yes
3​
8​
8​
2​
No
2​
4​
No
3​
6​
4​
5​
No
5​
7​
1​
6​
Yes
1​
1​
3​
3​

I2, control+shift+enter, not just enter, and copy down:
Rich (BB code):

=SUM(IF(MMULT(($A$2:$A$6=$H2)*($B$1:$F$1=I$1)*ISNUMBER($B$2:$F$6),
    TRANSPOSE(COLUMN($B$1:$F$6)^0))>0,1))
 
Upvote 0

Forum statistics

Threads
1,215,454
Messages
6,124,933
Members
449,195
Latest member
Stevenciu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top