NeedInformation
New Member
- Joined
- Feb 23, 2014
- Messages
- 14
- Office Version
- 2021
- Platform
- Windows
Trying to figure out the proper index(match()) to find the nth best of a list based on a couple of factors.
For example, if I have an unsorted table with rows of classes with class sizes and average grade in that class. I'd like to find the nth best highest average. Ties will be determine the the largest sized class. Ties beyond that sorted alphabetically.
Using the table below the top 3 classes should return:
I know I can use the large function to find the nth largest but it's the multiple criteria that is stumping me. Should be same as ordering the table by (Grade Average, then Students, then Class name).
Thank you, in advance, for your help!
For example, if I have an unsorted table with rows of classes with class sizes and average grade in that class. I'd like to find the nth best highest average. Ties will be determine the the largest sized class. Ties beyond that sorted alphabetically.
Using the table below the top 3 classes should return:
- Phys.Ed (Highest Grade and no classes with this grade nor class size)
- SocialMedia (Next highest grade (95) and the largest class size with that grade)
- Band (Next highest grade (95) and although it has the same class size as French (which comes earlier in the list, it is alphabetically first))
Thank you, in advance, for your help!
Class Name (guaranteed unique) | Students | Grade Average |
---|---|---|
History | 20 | 75 |
Algebra | 22 | 80 |
French | 15 | 95 |
SocialStudies | 22 | 87 |
Phys Ed | 18 | 100 |
Social Media | 32 | 95 |
Art History | 20 | 75 |
Government | 23 | 60 |
Band | 15 | 90 |