Countifs with multiple horizontal and vertical criteria

mobile73

New Member
Joined
Jun 5, 2018
Messages
2
Hi, hoping someone can help. Searched everywhere but can't find a solution. I want to be able to count number of entries matching multiple criteria. In example below, I would want to count number of non zero entries in Q1 1718 for Director AB and Manager A (so return a value of 2). Actual spreadsheet has thousands of rows so looking for a good solution. I know I can use sumproduct to sum the cells but I want to count the number of non zero entries.

Any help greatly appreciated, thanks.

M73


Book1
ABCDEFGHIJK
117181718171817181819181918191819
2Q1Q2Q3Q4Q1Q2Q3Q4
3DirectorManagerName
4ABAG94725778968199722893853
5ABAH76021675347852467861532
6ABBI1579342865817073443550
7BCCJ19018327107525359265
8BCDK75485560768338816242
9BCDL290661215966629142273896
10CDEM17950588368329777563923
11CDEN29923213340931647
12CDEO96978756303789434115108
13CDFP77784153836387560490866
Sheet1
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Control+shift+enter, not just enter:

=SUM(IF($A$4:$A$13="AB",IF($B$4:$B$13="A",IF(($D$1:$K$1=1718)*($D$2:$K$2="Q1"),IF(ISNUMBER($D$4:$K$13),1)))))
 
Upvote 0

Excel 2010
ABCDEFGHIJK
117181718171817181819181918191819
2Q1Q2Q3Q4Q1Q2Q3Q4
3DirectorManagerName
4ABAG94725778968199722893853
5ABAH76021675347852467861532
6ABBI1579342865817073443550
7BCCJ19018327107525359265
8BCDK75485560768338816242
9BCDL290661215966629142273896
10CDEM17950588368329777563923
11CDEN29923213340931647
12CDEO96978756303789434115108
13CDFP77784153836387560490866
14
15
16ABA1718Q12
Sheet2
Cell Formulas
RangeFormula
G16=SUMPRODUCT(--($A$4:$A$13=C16)*--($B$4:$B$13=D16)*--($D$1:$K$1=E16)*--($D$2:$K$2=F16)*--($D$4:$K$13<>""))


(mixing -- and * with sumproduct isn't always needed, but I was too lazy to test without)
 
Upvote 0

Forum statistics

Threads
1,223,894
Messages
6,175,250
Members
452,623
Latest member
Techenthusiast

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