Count with Multiple Criteria - Follow up

GMC The Macro Man

Board Regular
Joined
Mar 23, 2023
Messages
104
Office Version
  1. 2021
Platform
  1. Windows
Hi there,
This is a follow up question on a post i listed the other day and thanks to all who replied.
Here is the link for the previous question. How to count with Multiple Criteria

I'm looking for help on Outputs 2 and 3 on the attached sheet, and here is a breaking down of what is contained in the sheet.
1. The data table holds the pupil details and the subjects they are taking with their Target & Actual grades (They are given a Target Grade at the beginning of term and sit 3 exams through the year. The score for each exam is entered and this allows the teachers to see if the pupil is on Track to achieve their Target Grade)
2. The data table shown is only a small excerpt from the LIVE table which holds over 400 pupils with 15 columns for pupil personal details and then 25 subjects all with 5 columns each.
Requirement
Output 1. Completed with thanks to dreid1011, Eric W and Phuoc.
Output 2. I need to count how many pupils by YEAR, then by Nat Level and then by TARGET Grade. (I think this is a SUMPRODUCT similar to Output 1 but I don't know how to add the extra criteria to the formula)
Output 3. I need to count how many pupils by YEAR then by Nat Level but this time by Actual Grade at the time of the report. This will allow me to see a whole school view between the 2 Outputs on how many pupils are on Target (The pupils sit 3 exams, Oct, Jan and Mar. I want the latest results to be captured. Would it be better if I put a helper column at the end of each subject which would track the current Actual Grade)
I could then report this as Target v Actual in graph or table form.

If you are reading this post then thank you for doing so. Any help is welcome and I'm open to other ways for collating these reports if you have other ideas.

Thanks
GMC

Nat Grades.xlsx
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAGAH
1Pupil IDPupil NameYearART Nat LevelArt Target GradeArt OctArt KanArt MarBiology Nat LevelBiology Target GradeBiology OctBiology JanBiology MarEnglish Nat LevelEnglish Target GradeEnglish OctEnglish JanEnglish MarMaths Nat LevelMaths Target GradeMaths OctMaths JanMaths MarThis table has been completed using the formula submitted by dreid1011
2A1AliceS4Nat 346Nat 333Nat 454YearNat 3Nat 4Nat 5Nat 6Nat 7
3A2AlexS4Nat 446Nat 334Nat 333Nat 4541S4717000
4A3AndrewS4Nat 335Nat 433Nat 443Nat 454S50013110
5A4BobbyS4Nat 435Nat 423Nat 443Nat 436S60001112
6A5BrianS4Nat 312Nat 443Nat 436
7A6BettyS4Nat 354Nat 445Nat 435Count of Pupils by YEAR then by Nat Level who have a TARGET GRADE 1 to 6
8A7CharlesS4Nat 455Nat 445Nat 444YearNat Level123456
9A8ColinS5Nat 553Nat 523Nat 5542S4Nat 3
10A9DerekS5Nat 653Nat 635Nat 523Nat 645S4Nat 4
11A10DianeS5Nat 524Nat 522Nat 635S5Nat 5
12A11EdwardS5Nat 567Nat 544Nat 632Nat 644S5Nat 6
13A12EstherS5Nat 545Nat 633Nat 555S6Nat 6
14A13FrankS5Nat 634Nat 623Nat 535S6Nat 7
15A14FionaS5Nat 644Nat 534Nat 613Nat 545
16A15GeorgeS6Nat 722Nat 613Nat 654Count of Pupils by YEAR then by Nat Level who their latest Actual Grade - Oct to Mar
17A16GemmaS6Nat 712Nat 712Nat 634YearNat Level123456
18A17HarryS6Nat 722Nat 711Nat 712Nat 6443S4Nat 3
19A18HelenS6Nat 722Nat 633Nat 712Nat 655S4Nat 4
20A19JohnS6Nat 613Nat 633Nat 722Nat 733S5Nat 5
21A20JennyS6Nat 632Nat 723S5Nat 6
22A21KevinS6Nat 643Nat 634Nat 733S6Nat 6
23S6Nat 7
24
25
Sheet1
Cell Formulas
RangeFormula
AA3AA3=SUMPRODUCT((Nat_Grade[Year]=Z$3)*(Nat_Grade[[ART Nat Level]:[Maths Mar]]=AA$2))
AB3AB3=SUMPRODUCT((Nat_Grade[Year]=Z$3)*(Nat_Grade[[ART Nat Level]:[Maths Mar]]=AB$2))
AC3AC3=SUMPRODUCT((Nat_Grade[Year]=Z$3)*(Nat_Grade[[ART Nat Level]:[Maths Mar]]=AC$2))
AD3AD3=SUMPRODUCT((Nat_Grade[Year]=Z$3)*(Nat_Grade[[ART Nat Level]:[Maths Mar]]=AD$2))
AE3AE3=SUMPRODUCT((Nat_Grade[Year]=Z$3)*(Nat_Grade[[ART Nat Level]:[Maths Mar]]=AE$2))
AA4AA4=SUMPRODUCT((Nat_Grade[Year]=Z$4)*(Nat_Grade[[ART Nat Level]:[Maths Mar]]=AA$2))
AB4AB4=SUMPRODUCT((Nat_Grade[Year]=Z$4)*(Nat_Grade[[ART Nat Level]:[Maths Mar]]=AB$2))
AC4AC4=SUMPRODUCT((Nat_Grade[Year]=Z$4)*(Nat_Grade[[ART Nat Level]:[Maths Mar]]=AC$2))
AD4AD4=SUMPRODUCT((Nat_Grade[Year]=Z$4)*(Nat_Grade[[ART Nat Level]:[Maths Mar]]=AD$2))
AE4AE4=SUMPRODUCT((Nat_Grade[Year]=Z$4)*(Nat_Grade[[ART Nat Level]:[Maths Mar]]=AE$2))
AA5AA5=SUMPRODUCT((Nat_Grade[Year]=Z$5)*(Nat_Grade[[ART Nat Level]:[Maths Mar]]=AA$2))
AB5AB5=SUMPRODUCT((Nat_Grade[Year]=Z$5)*(Nat_Grade[[ART Nat Level]:[Maths Mar]]=AB$2))
AC5AC5=SUMPRODUCT((Nat_Grade[Year]=Z$5)*(Nat_Grade[[ART Nat Level]:[Maths Mar]]=AC$2))
AD5AD5=SUMPRODUCT((Nat_Grade[Year]=Z$5)*(Nat_Grade[[ART Nat Level]:[Maths Mar]]=AD$2))
AE5AE5=SUMPRODUCT((Nat_Grade[Year]=Z$5)*(Nat_Grade[[ART Nat Level]:[Maths Mar]]=AE$2))
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
countifs will allow you to count on multiple criteria, just select the range, then the criteria and it will return all items as an AND, so where all of the criteria are met.

Countifs help.
 
Upvote 0
For any given year and NAT level (as shown for your result table 2) what is the target grade?
For example, Alice is in S4 NAT3 for Art and English, but the target grades are 4 and 3 respectively. Similarly, Andrew has NAT4 targets of 3, 4 and 5. Or do you not mind double counts?
 
Upvote 0

Forum statistics

Threads
1,223,869
Messages
6,175,088
Members
452,611
Latest member
bls2024

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