Counting Variables in two column ranges

IainClover

New Member
Joined
Dec 1, 2020
Messages
11
Office Version
  1. 2013
Platform
  1. Windows
I have several columns in a sheet called “Data” that have a number of variables, that is intended to collate Equalities Data for an organisation.

In one column Range F3:F200 I have values for an individual’s age ranges i.e

18-21
22-29
30-39
40-49 etc etc

In another column Range K3:K200 I have values for another characteristic e.g religious faith

Anglican
Catholic
Muslim
Buddhist etc etc

In a separate sheet, I am trying to collate the data in the following way …

Individuals aged 22-29 that are also Catholic
Or
Individuals aged 22-29 that are also Muslim etc etc etc

I have tried doing this with a CountIf statement, but am having no joy, can someone advise me of the correct formula

Thanks in advance
Iain C
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Hi Iain,

COUNTIFS came in with Excel 2013 so it should be available to you

IainClover.xlsx
FK
1
2Age RangeReligion
318-21Anglican
422-29Catholic
530-39Muslim
640-49Buddhist
718-21Anglican
822-29Catholic
930-39Muslim
1050-65Buddhist
1150-65Anglican
1222-29Catholic
13
Sheet1


IainClover.xlsx
A
1Result
23
Sheet2
Cell Formulas
RangeFormula
A2A2=COUNTIFS(Sheet1!$F$3:$F$200,"22-29",Sheet1!$K$3:$K$200,"Catholic")
 
Upvote 0
Assuming headings in row 2, including G2:J2, what about using Excel's built-in Pivot Table feature (find it on the 'Insert' ribbon tab) to provide all the counts and totals at once?

21 11 07.xlsm
FKLMNOPQRS
1
2Age RangeReligionCount of Age RangeAge Range
318-21AnglicanReligion18-2122-2930-3940-4950-65Grand Total
422-29CatholicAnglican213
530-39MuslimBuddhist112
640-49BuddhistCatholic33
718-21AnglicanMuslim22
822-29CatholicGrand Total2321210
930-39Muslim
1050-65Buddhist
1150-65Anglican
1222-29Catholic
13
PT
 
Upvote 0
Thank you, I had tried a similar formula but with "Countif" not "Countifs" .... that made all the difference
Iain C
 
Upvote 0
Thank you, I had tried a similar formula but with "Countif" not "Countifs" .... that made all the difference
Iain C
You're welcome.
...and I'm glad you have COUNTIFS available in your Excel 2013 so I didn't have to resort to SUMPRODUCT

IainClover.xlsx
A
1Result
23
Sheet3
Cell Formulas
RangeFormula
A2A2=SUMPRODUCT(--(Sheet1!$F$3:$F$200="22-29")*(Sheet1!$K$3:$K$200="Catholic"))
 
Upvote 0

Forum statistics

Threads
1,215,063
Messages
6,122,927
Members
449,094
Latest member
teemeren

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