XOOKUP (or similar) to return duplicate values for school test results analysis

Nibbos

New Member
Joined
Mar 26, 2022
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hi,
I have a school class with data from a recent test.
The test was out of 10.
Some students scored the same mark as others.
I'd like to display the score (from 10 down to 1) in the first column, and then list all the students who attained each score in the row next to their score.
My spreadsheet has the data in a small table, next to it is my attempt at using XLOOKUP, but it only returns one of the values, not duplicates. The third table is what I'd like my output to look like
smile.gif

I know that I can use wildcards, look from the bottom up, etc. with XLOOKUP, but I don't know how to make it give me the different students who scored the same score as each other. Pupils with the same score can be written in adjacent cells or all be written in the same cell, I don't mind. I can always CONCATENATE them after.
The reason is that we normally hand write a paper chart with all the score values in the left-hand column (from 1 up to the maximum test score) and then simply fill in by hand the names of each student in the row corresponding to their score. This allows a visual overview of the group's performance AND we can put several groups side-by-side to see how different groups fared compared with each other (spread and distribution of scores).
Any guidance gratefully accepted.
Thanks in advance.
Nibbos

PS In my final version I may have up to 100 students, so there may be 5-10 students who get the same score at any one time.

Test scores results viewer.xlsx
ABCDEFGHIJKLM
1Test dataAnalysisAnalysis
2studentscoreScoreStudentStudentStudentScoreStudentStudentStudent
3alan610 10 
4ben29denise9denise
5chris88chris8chriskate
6denise97hilda7hilda
7enid66alan6alanenidgeo
8flo45ian5ianjack
9geo64flo4flo
10hilda73 3 
11ian52ben2ben
12jack51 1 
13kate80 0 
14
15what I have achieved so farwhat I want it to look like
16
Sheet1
Cell Formulas
RangeFormula
E3:E13,J3:J13E3=XLOOKUP($D3,Table1[score],Table1[student],"")
 

Attachments

  • Test Scores jpg.jpg
    Test Scores jpg.jpg
    91.1 KB · Views: 8

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
How about

Book3
DEFG
1610 
179denise
188chriskate
197hilda
206alanenidgeo
215ianjack
224flo
233 
242ben
251 
260 
Sheet3
Cell Formulas
RangeFormula
E16:E17,E19,E22:E26,E21:F21,E20:G20,E18:F18E16=TRANSPOSE(FILTER($A$3:$A$13,D16=$B$3:$B$13,""))


If the original is a table, then you want something like this:

Book3
DEFG
1610 
179denise
188chriskate
197hilda
206alanenidgeo
215ianjack
224flo
233 
242ben
251 
260 
Sheet3
Cell Formulas
RangeFormula
E16:E17,E19,E22:E26,E21:F21,E20:G20,E18:F18E16=TRANSPOSE(FILTER(Table1[student],D16=Table1[score],""))
 
Last edited:
Upvote 0
since the source data isent sorted then: =IFERROR(TEXTJOIN(",";;UNIQUE(FILTER($A$3:$A$17;$B$3:$B$17=$D3)));"")
 
Upvote 0
Solution
Thank you so much. All great solutions.
Regards
Nibbos
 
Upvote 0

Forum statistics

Threads
1,214,923
Messages
6,122,286
Members
449,076
Latest member
kenyanscott

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