Count with Multiple Criteria

holyrollyp

New Member
Joined
Apr 2, 2023
Messages
13
Office Version
  1. 365
Platform
  1. Windows
Hello Excel Experts,

I need your advice please on how I can do my count in Excel using multiple row and column criteria. I already checked online but I could only see two criteria, while my case has 3. I cannot make it work. Below is the sample data I am working on and the the last table is what I was trying to achieve.

I have one cell for Country and it has a dropdown for United States, Japan, Australia and SIngapore.
if I chose a country, I want to count the no of criteria for each employee.
Example. for United States, James have 2 Membership issue, 1 Quality Issue and 1 system issue.
I would like to do this count for all employees per country and per criteria. can you help with the right formula please?

EmployeeCriteriaCountry
JamesQuality IssueUnited States
MarcQuality IssueAustralia
KevinMembership IssueJapan
DianaSystem IssueUnited States
VincentMembership IssueSingapore
MaryPricing IssueJapan
MaryPricing IssueSingapore
JamesSystem IssueUnited States
JamesMembership IssueJapan
MarcSystem IssueUnited States
MarcQuality IssueAustralia
MarcMembership IssueAustralia
VincentSystem IssueJapan
VincentMembership IssueUnited States
JamesQuality IssueSingapore
JamesPricing IssueSingapore
KevinSystem IssueUnited States
JamesSystem IssueSingapore
KevinPricing IssueUnited States
MaryMembership IssueJapan
MaryQuality IssueUnited States
DianaQuality IssueAustralia
DianaQuality IssueJapan
MarcMembership IssueSingapore
MarcSystem IssueUnited States
VincentQuality IssueJapan
VincentMembership IssueUnited States
JamesSystem IssueSingapore
JamesMembership IssueUnited States
JamesSystem IssueJapan
JamesMembership IssueUnited States

CountryUnited States
Membership IssuePricing IssueQuality IssueSystem Issue
Diana
1​
James
2​
1​
1​
Kevin
1​
1​
Marc
2​
Mary
1​
Vincent
2​
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Book1
ABCDEFGHIJ
1EmployeeCriteriaCountry
2JamesQuality IssueUnited StatesCountrySingapore
3MarcQuality IssueAustralia
4KevinMembership IssueJapanMembership IssuePricing IssueQuality IssueSystem Issue
5DianaSystem IssueUnited StatesDiana    
6VincentMembership IssueSingaporeJames 112
7MaryPricing IssueJapanKevin    
8MaryPricing IssueSingaporeMarc1   
9JamesSystem IssueUnited StatesMary 1  
10JamesMembership IssueJapanVincent1   
11MarcSystem IssueUnited States
12MarcQuality IssueAustralia
13MarcMembership IssueAustralia
14VincentSystem IssueJapan
15VincentMembership IssueUnited States
16JamesQuality IssueSingapore
17JamesPricing IssueSingapore
18KevinSystem IssueUnited States
19JamesSystem IssueSingapore
20KevinPricing IssueUnited States
21MaryMembership IssueJapan
22MaryQuality IssueUnited States
23DianaQuality IssueAustralia
24DianaQuality IssueJapan
25MarcMembership IssueSingapore
26MarcSystem IssueUnited States
27VincentQuality IssueJapan
28VincentMembership IssueUnited States
29JamesSystem IssueSingapore
30JamesMembership IssueUnited States
31JamesSystem IssueJapan
32JamesMembership IssueUnited States
Sheet1
Cell Formulas
RangeFormula
G5:J10G5=COUNTIFS($A$2:$A$32,$F5,$B$2:$B$32,G$4,$C$2:$C$32,$G$2)
Cells with Data Validation
CellAllowCriteria
G2ListUnited States,Japan,Australia,Singapore
 
Upvote 0
Wow, that was fast. Thanks so much, i will teat this tomorrow and will give an update. I am positibw this is already what I was looking for. Have a great weekend, Kevin, thanks so much again,
 
Upvote 0
Wow, that was fast. Thanks so much, i will teat this tomorrow and will give an update. I am positibw this is already what I was looking for. Have a great weekend, Kevin, thanks so much again,
I look forward to hearing back from you after testing, and welcome to the board! (y) :)
 
Upvote 0
@holyrollyp Welcome.

If by any chance you would want a dynamic list, featuring only the employees having issues relating to the country in question then, try @kevin9999 's solution with the single additional formula in F5.

Book3
ABCDEFGHIJ
1EmployeeCriteriaCountry
2JamesQuality IssueUnited StatesCountryJapan
3MarcQuality IssueAustralia
4KevinMembership IssueJapanMembership IssuePricing IssueQuality IssueSystem Issue
5DianaSystem IssueUnited StatesKevin1000
6VincentMembership IssueSingaporeMary1100
7MaryPricing IssueJapanJames1001
8MaryPricing IssueSingaporeVincent0011
9JamesSystem IssueUnited StatesDiana0010
10JamesMembership IssueJapan    
11MarcSystem IssueUnited States    
12MarcQuality IssueAustralia    
13MarcMembership IssueAustralia    
14VincentSystem IssueJapan    
15VincentMembership IssueUnited States    
16JamesQuality IssueSingapore    
17JamesPricing IssueSingapore    
18KevinSystem IssueUnited States    
19JamesSystem IssueSingapore    
20KevinPricing IssueUnited States    
21MaryMembership IssueJapan
22MaryQuality IssueUnited States
23DianaQuality IssueAustralia
24DianaQuality IssueJapan
25MarcMembership IssueSingapore
26MarcSystem IssueUnited States
27VincentQuality IssueJapan
28VincentMembership IssueUnited States
29JamesSystem IssueSingapore
30JamesMembership IssueUnited States
31JamesSystem IssueJapan
32JamesMembership IssueUnited States
Sheet3
Cell Formulas
RangeFormula
F5:F9F5=UNIQUE(FILTER(A:A,C:C=$G$2,""))
G5:J20G5=IF(F5="","",COUNTIFS($A$2:$A$32,$F5,$B$2:$B$32,G$4,$C$2:$C$32,$G$2))
Dynamic array formulas.


Hope that helps.
 
Upvote 0
@holyrollyp Welcome.

If by any chance you would want a dynamic list, featuring only the employees having issues relating to the country in question then, try @kevin9999 's solution with the single additional formula in F5.

Book3
ABCDEFGHIJ
1EmployeeCriteriaCountry
2JamesQuality IssueUnited StatesCountryJapan
3MarcQuality IssueAustralia
4KevinMembership IssueJapanMembership IssuePricing IssueQuality IssueSystem Issue
5DianaSystem IssueUnited StatesKevin1000
6VincentMembership IssueSingaporeMary1100
7MaryPricing IssueJapanJames1001
8MaryPricing IssueSingaporeVincent0011
9JamesSystem IssueUnited StatesDiana0010
10JamesMembership IssueJapan    
11MarcSystem IssueUnited States    
12MarcQuality IssueAustralia    
13MarcMembership IssueAustralia    
14VincentSystem IssueJapan    
15VincentMembership IssueUnited States    
16JamesQuality IssueSingapore    
17JamesPricing IssueSingapore    
18KevinSystem IssueUnited States    
19JamesSystem IssueSingapore    
20KevinPricing IssueUnited States    
21MaryMembership IssueJapan
22MaryQuality IssueUnited States
23DianaQuality IssueAustralia
24DianaQuality IssueJapan
25MarcMembership IssueSingapore
26MarcSystem IssueUnited States
27VincentQuality IssueJapan
28VincentMembership IssueUnited States
29JamesSystem IssueSingapore
30JamesMembership IssueUnited States
31JamesSystem IssueJapan
32JamesMembership IssueUnited States
Sheet3
Cell Formulas
RangeFormula
F5:F9F5=UNIQUE(FILTER(A:A,C:C=$G$2,""))
G5:J20G5=IF(F5="","",COUNTIFS($A$2:$A$32,$F5,$B$2:$B$32,G$4,$C$2:$C$32,$G$2))
Dynamic array formulas.


Hope that helps.
Tnx snakehips,
That’s a great idea, too. However, for now, my country list is fixed and will always be those 4 countries. i will surely try your formula as well, and will keep it for future use. Thanks!
 
Upvote 0
Another option so that the formula spills, is
Fluff.xlsm
ABCDEFGHIJ
1EmployeeCriteriaCountry
2JamesQuality IssueUnited StatesCountryJapan
3MarcQuality IssueAustralia
4KevinMembership IssueJapanMembership IssuePricing IssueQuality IssueSystem Issue
5DianaSystem IssueUnited StatesKevin1000
6VincentMembership IssueSingaporeMary1100
7MaryPricing IssueJapanJames1001
8MaryPricing IssueSingaporeVincent0011
9JamesSystem IssueUnited StatesDiana0010
10JamesMembership IssueJapan
11MarcSystem IssueUnited States
12MarcQuality IssueAustralia
13MarcMembership IssueAustralia
14VincentSystem IssueJapan
15VincentMembership IssueUnited States
16JamesQuality IssueSingapore
17JamesPricing IssueSingapore
18KevinSystem IssueUnited States
19JamesSystem IssueSingapore
20KevinPricing IssueUnited States
21MaryMembership IssueJapan
22MaryQuality IssueUnited States
23DianaQuality IssueAustralia
24DianaQuality IssueJapan
25MarcMembership IssueSingapore
26MarcSystem IssueUnited States
27VincentQuality IssueJapan
28VincentMembership IssueUnited States
29JamesSystem IssueSingapore
30JamesMembership IssueUnited States
31JamesSystem IssueJapan
32JamesMembership IssueUnited States
33
Sheet4
Cell Formulas
RangeFormula
F5:F9F5=UNIQUE(FILTER(A2:A1000,C2:C1000=$G$2,""))
G5:J9G5=COUNTIFS(A:A,F5#,B:B,G4:J4,C:C,G2)
Dynamic array formulas.
 
Upvote 0
COUNTIFS($A$2:$A$32,$F5,$B$2:$B$32,G$4,$C$2:$C$32,$G$2)
Hello @kevin9999,
Thanks very much! The formula works. I just change it a bit so that if the cell is 0, i would like it to be "" instead of the 0 value.
Appreciate your help.
Have a great and safe day ahead.
 
Upvote 0
Hello @kevin9999,
Thanks very much! The formula works. I just change it a bit so that if the cell is 0, i would like it to be "" instead of the 0 value.
Appreciate your help.
Have a great and safe day ahead.
Glad I could help & thanks for the feedback (y) :)
 
Upvote 0

Forum statistics

Threads
1,224,856
Messages
6,181,425
Members
453,039
Latest member
jr25673

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