Support with Formula or Macro for matching cells and finding max range

MrsTeach

New Member
Joined
Jan 4, 2023
Messages
6
Office Version
  1. 365
Platform
  1. Web
Hi, I'm a teacher and I'm trying to put together some data for progression.

I'd be really grateful if anyone could point me in the right direction.


Book1
ABCDEF
1Cohort IDSizeProgression
2Coniston223
3Derwent1411
4Coniston225
5Coniston2221
6Derwent1414
7
8
9Size of Cohort with biggest difference in progression from lowest to highest
10
11
12
Sheet1



I'm really rusty with Excel!

The above is an example of a huge dataset of pupils in our group of schools. I'm looking to return the 'Size' of the cohort with the biggest difference in Progression. If there's more than one cohort with the same difference, then just the first value.

Any help would be fantastic! I can't get my head around it!
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Excel Formula:
=LET(z,A2:A6,y,B2:B6,x,C2:C6,a,UNIQUE(z),b,MAXIFS(x,z,a),c,MINIFS(x,z,a),d,b-c,e,MAX(d),f,INDEX(a,XMATCH(e,d,0)),XLOOKUP(f,z,y))
 
Upvote 0
Solution
How about this:
Book1
ABCD
1Cohort IDSizeProgressionDifference
2Coniston2230
3Derwent14110
4Coniston2255
5Coniston222126
6Derwent141414
7
8Coniston22
Sheet2
Cell Formulas
RangeFormula
D2:D6D2=SUMIF($A$2:A2,A2,$C$2:C2)-MINIFS($C$2:C2,$A$2:A2,A2)
A8:B8A8=FILTER(A2:B6,D2:D6=MAX(D2:D6))
Dynamic array formulas.
 
Upvote 0
Wow! That's complex. I'll work my way through trying to understand it. Thank you so much!
Probably a dumb question, but how do I get the returned value (22) to show in the cell the formula's in? Currently just shows this:

1672858110347.png


But returns the correct value in the formula builder:

1672858063670.png
 
Upvote 0
I can't say why excel for the web wouldn't show the number. I'm not too savvy with that. I use it occasionally, and it seems to work for me. I've never seen it stuck as the formulatext.
 
Upvote 0
Another option
Fluff.xlsm
ABCDEF
1Cohort IDSizeProgression
2Coniston223Coniston22
3Derwent1411
4Coniston225
5Coniston2221
6Derwent1414
7
8
Main
Cell Formulas
RangeFormula
E2:F2E2=LET(u,UNIQUE(FILTER(A2:B100,A2:A100<>"")),m,MAXIFS(C:C,A:A,INDEX(u,,1)),TAKE(SORTBY(u,m,-1),1))
Dynamic array formulas.
 
Upvote 0
Excel Formula:
=LET(z,A2:A6,y,B2:B6,x,C2:C6,a,UNIQUE(z),b,MAXIFS(x,z,a),c,MINIFS(x,z,a),d,b-c,e,MAX(d),f,INDEX(a,XMATCH(e,d,0)),XLOOKUP(f,z,y))
Sorry to ask again, but could you also possible help with this?

Book1
ABCD
1Set IDPupil IDSex
2111111
3122221
4133332
5144441
6255552
7266661
8277772
9288882
10399991
11310002
12311001
13
14Total Number of All Female Sets (Where female = 2)
15
16
Data


I'm trying to calculate the total number of sets which are all female (female = 2)
 
Upvote 0
As this is a totally different question, it needs a new thread. Thanks
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,874
Members
452,363
Latest member
merico17

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