COUNTIFS using same range (table), different criteria (columns)

darkbluecat

New Member
Joined
Jan 7, 2021
Messages
20
Office Version
  1. 365
Platform
  1. Windows
Big table, with multiple columns, need to count no. of times it meets two criteria (two columns) in the table. Once I've got right formula I'll copy it across the new, simple table I've made: one criteria is x axis (headers), other criteria is y (first column). In the big table, i just need the number of times it meets both criteria (the name and code).

Can't attach file or give any more information as it's work stuff. Everything I try and do just returns zero, I've tried countif + countif and that doesn't work either. Also, array formulas won't cut it because there's so many name criterias and codes, all solutions I've found are to do with incorporating array formulas. In the simple table I'm making I just want the no. of times the specified cell (code in big table) appears under such and such name (name in big table in another column).

I reckon the solution has something to do with using maybe index and match functions outside the countif/s function, but I don't really know enough about these to figure it out myself.
 

Some videos you may like

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December

EFANYoutube

Board Regular
Joined
May 19, 2017
Messages
162
Hi Darkbluecat
If maybe you could paste an example
From your description it sounds like a =Countifs() should work but maybe you haven't quite got it right?

Countifs(range,criteria,range,criteria)
Range should be single column, Criteria should be a single piece of information e.g. a cell or string like "Cat"

Pardon me if i'm assuming wrongly but I found your question slightly confusing

Thanks
Excel Fan
 

darkbluecat

New Member
Joined
Jan 7, 2021
Messages
20
Office Version
  1. 365
Platform
  1. Windows
Hi Darkbluecat
If maybe you could paste an example
From your description it sounds like a =Countifs() should work but maybe you haven't quite got it right?

Countifs(range,criteria,range,criteria)
Range should be single column, Criteria should be a single piece of information e.g. a cell or string like "Cat"

Pardon me if i'm assuming wrongly but I found your question slightly confusing

Thanks
Excel Fan
Yeah, that's what I'm doing, the column is the range and the cell header is the criteria, but it's two ranges in one table and different cell criterias
 

EFANYoutube

Board Regular
Joined
May 19, 2017
Messages
162
Yes, so this is common for Countifs()

under Male and 25 the formula is =COUNTIFS($E:$E,L$1,$H:$H,$K2)
it uses criteria age and gender from 2 ranges
idfirst_namelast_nameemailgenderip_addressageAge/GenderMaleFemale
1​
RaymundLe Noirrlenoir0@java.comMale185.190.34.110
25​
25​
2​
3​
2​
LinnellBauslbaus1@vk.comFemale61.140.171.176
61​
26​
1​
3​
3​
BennieBrecknallbbrecknall2@ucoz.comFemale80.20.190.45
36​
4​
BalduinCranbcran3@tinypic.comMale208.214.65.175
65​
5​
NobieKlempsnklemps4@list-manage.comMale185.86.113.143
25​
6​
MintaLawtymlawty5@wikipedia.orgFemale178.93.114.31
68​
7​
MorgunMattheismmattheis6@bloomberg.comMale2.108.19.78
75​
8​
FlorindaO'Dowgainefodowgaine7@360.cnFemale69.176.51.97
42​
9​
BarbaraMincibminci8@paginegialle.itFemale145.221.30.213
51​
10​
GardnerCackroftgcockroft9@apache.orgMale203.161.101.51
26​
11​
SunnyHannabussshannabussa@cbslocal.comFemale188.202.200.139
42​
12​
CelestiaAbramowskycabramowskyb@home.plFemale161.146.186.244
26​
13​
DanielaHortopdhortopc@wp.comFemale142.235.65.156
25​
14​
MinerMatesmmatesd@dropbox.comMale48.139.220.69
42​
15​
RayIsacrisace@artisteer.comMale98.152.55.108
36​
16​
LuceLinskeyllinskeyf@hhs.govMale167.241.111.71
42​
17​
BrynnaJeanenetbjeanenetg@japanpost.jpFemale186.135.174.36
25​
18​
HeatherDeackeshdeackesh@imgur.comFemale21.185.193.192
26​
19​
AgneseWoodwardawoodwardi@timesonline.co.ukFemale210.7.185.141
25​
20​
EleanorArsnellearsnellj@cargocollective.comFemale187.194.185.152
26​
 

darkbluecat

New Member
Joined
Jan 7, 2021
Messages
20
Office Version
  1. 365
Platform
  1. Windows

ADVERTISEMENT

Yes, so this is common for Countifs()

under Male and 25 the formula is =COUNTIFS($E:$E,L$1,$H:$H,$K2)
it uses criteria age and gender from 2 ranges
idfirst_namelast_nameemailgenderip_addressageAge/GenderMaleFemale
1​
RaymundLe Noirrlenoir0@java.comMale185.190.34.110
25​
25​
2​
3​
2​
LinnellBauslbaus1@vk.comFemale61.140.171.176
61​
26​
1​
3​
3​
BennieBrecknallbbrecknall2@ucoz.comFemale80.20.190.45
36​
4​
BalduinCranbcran3@tinypic.comMale208.214.65.175
65​
5​
NobieKlempsnklemps4@list-manage.comMale185.86.113.143
25​
6​
MintaLawtymlawty5@wikipedia.orgFemale178.93.114.31
68​
7​
MorgunMattheismmattheis6@bloomberg.comMale2.108.19.78
75​
8​
FlorindaO'Dowgainefodowgaine7@360.cnFemale69.176.51.97
42​
9​
BarbaraMincibminci8@paginegialle.itFemale145.221.30.213
51​
10​
GardnerCackroftgcockroft9@apache.orgMale203.161.101.51
26​
11​
SunnyHannabussshannabussa@cbslocal.comFemale188.202.200.139
42​
12​
CelestiaAbramowskycabramowskyb@home.plFemale161.146.186.244
26​
13​
DanielaHortopdhortopc@wp.comFemale142.235.65.156
25​
14​
MinerMatesmmatesd@dropbox.comMale48.139.220.69
42​
15​
RayIsacrisace@artisteer.comMale98.152.55.108
36​
16​
LuceLinskeyllinskeyf@hhs.govMale167.241.111.71
42​
17​
BrynnaJeanenetbjeanenetg@japanpost.jpFemale186.135.174.36
25​
18​
HeatherDeackeshdeackesh@imgur.comFemale21.185.193.192
26​
19​
AgneseWoodwardawoodwardi@timesonline.co.ukFemale210.7.185.141
25​
20​
EleanorArsnellearsnellj@cargocollective.comFemale187.194.185.152
26​
I tried this and it just comes up with zero
 

maabadi

Well-known Member
Joined
Oct 22, 2012
Messages
1,354
Office Version
  1. 2019
  2. 2016
Platform
  1. Windows
You should upload example file with your formula has problem to check it.
 

darkbluecat

New Member
Joined
Jan 7, 2021
Messages
20
Office Version
  1. 365
Platform
  1. Windows

ADVERTISEMENT

does anyone know how to use countifs with index match functions?
 

EFANYoutube

Board Regular
Joined
May 19, 2017
Messages
162
Index Match gets only one value from a matrix

There is something wrong with your formula and we can't help unless you can show us the sheet sorry
 

Watch MrExcel Video

Forum statistics

Threads
1,123,252
Messages
5,600,543
Members
414,386
Latest member
PARAMATHMA SENTHILNATHAN

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
Top