Count Not of Grades

GMC The Macro Man

Board Regular
Joined
Mar 23, 2023
Messages
104
Office Version
  1. 2021
Platform
  1. Windows
Hi Team, I hope you are all doing well

I have 400 students who will sit at least 5 exams from a list of 25 subjects. The report is downloaded from the mainframe in a continuous table form so it looks like this.
St Maurice High School - June 2024.xlsx
ABCDE
1ID NoForenameYear GroupNat LevelGrade
2P12345AaliyahS6
3P12346AbbyS6Nat 64
4P12347AidanS6
5P12348ArranS6Nat 66
6P12349AydenS6
Sheet3


It will show the list of 400 students and how they scored on the 1st subject, and then on the bottom line it will show the 400 pupils on the 2nd subject, then on the bottom line it will show the 400 on the 3rd subject.. and so on ... It will continuously add this 25 times for the 25 subjects.

What I am trying to achieve is from this data table, to count, the total of NAT Levels each individual pupil sat at "Nat 3, Nat4, Nat 5 & Nat 6" and how many of these Levels had a grade of less than 7. (Less than 7 means a Pass).

I want my output to look like this it to look like this table below ( If you filter the main Data table at the bottom, you will "P12346" has only sat 3 at NAT 6 and all are below "7")
St Maurice High School - June 2024.xlsx
HIJKLMNOPQ
1ID NoYear GroupNat 37Nat 47Nat 57Nat 67
3P12346S600000033
12P12355S500002100
29P12372S411210000
Sheet3


Here is the data i used for this conversation, but the size of this would be 400 pupils multiplied by 25 subjects so 10k rows. ( I Don't mean to confuse you here)
I hope someone can help here
Thanks

St Maurice High School - June 2024.xlsx
ABCDE
1ID NoForenameYear GroupNat LevelGrade
2P12345AaliyahS6
3P12346AbbyS6Nat 64
4P12347AidanS6
5P12348ArranS6Nat 66
6P12349AydenS6
7P12350AidanS6
8P12351Aimee MarieS6Nat 63
9P12352Alexa AnnS6
10P12353Alisha SelinaS6
11P12354Andrew LukasS6Nat 68
12P12355Zoe McCannS5
13P12356AidenS5
14P12357Aimee KathleenS5Nat 57
15P12358AlleishaS5
16P12359Brandon DavidS5
17P12360AbbieS5Nat 55
18P12361BethanyS5
19P12362CaitlinS5
20P12363CarlyS5Nat 53
21P12364DylanS5
22P12365AdamS4
23P12366AimeeS4Nat 41
24P12367Bobby DavidS4
25P12368ColeS4
26P12369CorryS4Nat 47
27P12370Aaron AnthonyS4
28P12371AaronS4
29P12372BethS4Nat 36
30P12373AidenS4
31P12374AimeeS4Nat 44
32P12345AaliyahS6
33P12346AbbyS6Nat 62
34P12347AidanS6Nat 66
35P12348ArranS6Nat 66
36P12349AydenS6
37P12350AidanS6
38P12351Aimee MarieS6Nat 63
39P12352Alexa AnnS6
40P12353Alisha SelinaS6Nat 67
41P12354Andrew LukasS6
42P12355Zoe McCannS5Nat 59
43P12356AidenS5
44P12357Aimee KathleenS5Nat 43
45P12358AlleishaS5Nat 54
46P12359Brandon DavidS5
47P12360AbbieS5Nat 45
48P12361BethanyS5
49P12362CaitlinS5Nat 66
50P12363CarlyS5
51P12364DylanS5Nat 52
52P12365AdamS4
53P12366AimeeS4Nat 57
54P12367Bobby DavidS4Nat 58
55P12368ColeS4
56P12369CorryS4Nat 33
57P12370Aaron AnthonyS4Nat 35
58P12371AaronS4
59P12372BethS4Nat 46
60P12373AidenS4
61P12374AimeeS4Nat 47
62P12345AaliyahS6
63P12346AbbyS6Nat 62
64P12347AidanS6
65P12348ArranS6Nat 66
66P12349AydenS6
67P12350AidanS6Nat 54
68P12351Aimee MarieS6Nat 55
69P12352Alexa AnnS6Nat 65
70P12353Alisha SelinaS6
71P12354Andrew LukasS6
72P12355Zoe McCannS5Nat 53
73P12356AidenS5
74P12357Aimee KathleenS5
75P12358AlleishaS5Nat 53
76P12359Brandon DavidS5
77P12360AbbieS5Nat 52
78P12361BethanyS5
79P12362CaitlinS5
80P12363CarlyS5Nat 62
81P12364DylanS5
82P12365AdamS4Nat 56
83P12366AimeeS4
84P12367Bobby DavidS4
85P12368ColeS4Nat 48
86P12369CorryS4
87P12370Aaron AnthonyS4Nat 46
88P12371AaronS4
89P12372BethS4Nat 44
90P12373AidenS4Nat 49
91P12374AimeeS4Nat 32
Sheet3
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.

I found this on Youtube, ..thanks to Computergaga. This will give me what I'm looking for at the moment, but if anyone knows a better way to complete it would be appreciated

I used this for counting the NAT Levels - =SUMPRODUCT((Table37[ID No]=$H2)*(Table37[Nat Level]=J$1))
And this for counting the Nat Levels which are less than 7 - =SUMPRODUCT((Table37[ID No]=$H2)*(Table37[Nat Level]=J$1)*(Table37[Grade]<K$1))

Thanks for looking
George
 
Last edited:
Upvote 0
Similar to what you already found:
Book1
GHIJKLMNOP
1ID NoYear GroupNat 37Nat 47Nat 57Nat 67
2P12345S600000000
3P12346S600000033
4P12347S600000011
5P12348S600000033
6P12349S600000000
7P12350S600001100
8P12351S600001122
9P12352S600000011
10P12353S600000010
11P12354S600000010
12P12355S500002100
13P12356S500000000
14P12357S500111000
15P12358S500002200
16P12359S500000000
17P12360S500112200
18P12361S500000000
19P12362S500000011
20P12363S500001111
21P12364S500001100
22P12365S400001100
23P12366S400111000
24P12367S400001000
25P12368S400100000
26P12369S411100000
27P12370S411110000
28P12371S400000000
29P12372S411220000
30P12373S400100000
31P12374S411210000
Sheet1
Cell Formulas
RangeFormula
G2:H31G2=CHOOSECOLS(UNIQUE(A2:C91),{1,3})
I2:I31,K2:K31,M2:M31,O2:O31I2=COUNTIFS($A$2:$A$91,$G2,$D$2:$D$91,I$1)
J2:J31,L2:L31,N2:N31,P2:P31J2=COUNTIFS($A$2:$A$91,$G2,$D$2:$D$91,I$1,$E$2:$E$91,"<7")
Dynamic array formulas.
 
Upvote 0
Solution
Similar to what you already found:
Book1
GHIJKLMNOP
1ID NoYear GroupNat 37Nat 47Nat 57Nat 67
2P12345S600000000
3P12346S600000033
4P12347S600000011
5P12348S600000033
6P12349S600000000
7P12350S600001100
8P12351S600001122
9P12352S600000011
10P12353S600000010
11P12354S600000010
12P12355S500002100
13P12356S500000000
14P12357S500111000
15P12358S500002200
16P12359S500000000
17P12360S500112200
18P12361S500000000
19P12362S500000011
20P12363S500001111
21P12364S500001100
22P12365S400001100
23P12366S400111000
24P12367S400001000
25P12368S400100000
26P12369S411100000
27P12370S411110000
28P12371S400000000
29P12372S411220000
30P12373S400100000
31P12374S411210000
Sheet1
Cell Formulas
RangeFormula
G2:H31G2=CHOOSECOLS(UNIQUE(A2:C91),{1,3})
I2:I31,K2:K31,M2:M31,O2:O31I2=COUNTIFS($A$2:$A$91,$G2,$D$2:$D$91,I$1)
J2:J31,L2:L31,N2:N31,P2:P31J2=COUNTIFS($A$2:$A$91,$G2,$D$2:$D$91,I$1,$E$2:$E$91,"<7")
Dynamic array formulas.
Cheers and thanks for taking the time to look. I'm halfway through putting my solutions in so I will stick with this at the moment, but I will certainly give yours a go later
All the best
George
 
Upvote 0

Forum statistics

Threads
1,224,812
Messages
6,181,088
Members
453,021
Latest member
Justyna P

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