Formulae / LOOKUP help

Beddy Boy

New member
Joined
Feb 1, 2017
Messages
48
Reaction score
0
Points
0
Excel Version(s)
Excel 365
Hi,

I would really appreciate some help in setting up a spreadsheet.

I have a table with pupils ID numbers followed by a score for a test in the adjacent column.

PT1PT2PT3
233211.5
4454215
587859.5
79.59976
91510111112
11121415


I wish to set up a table where pupils ID numbers are set out in a table automatically depending on their score - A 0-5, B 5-10, C > 10

A B C
T12,45,79
T23,57,910,11
T315,72,11,14


Then following this, Another table where the average scores are displayed.

A B C
T1 3.5 9 15 etc. etc.

Please can anyone help with coding for this?

Many thanks,

Wayne
 
Save us time and attach a workbook with the first table in, making it as true-to-life as you can without revealing sensitive data.
 
Save us time and attach a workbook with the first table in, making it as true-to-life as you can without revealing sensitive data.

Thank you for the response.

Please see file.

Please let me know if you need anymore info.
 

Attachments

  • Pulpil scores.xlsx
    9.8 KB · Views: 17
In the attached:

  • List (Table 1) created at cell A13 can be recreated by clicking the button at cell F11
  • Table 2 at cell I13 uses formula in range J14, copied down and across. This formula is ARRAY-ENTERED.
  • Table 3 at cell N12 is a simple pivot table.
 

Attachments

  • ExcelGuru10448Pulpil scores.xlsm
    25.7 KB · Views: 16
Thank you very much for your help!

If I click create table then table 2 is populated correctly. However, table 3 doesn't change.

For example, if all the results in Test 1 for all pupils are 3, the average for Test 1 (with scores 0-5) in Cell 014, would be 3. Unfortunately this doesn't change at the moment.

Thanks again,

Wayne
 
Based on provided example spreadsheet

J2=TEXTJOIN(",",,IF((OFFSET($A$2,,MATCH($I2,$B$1:$F$1,),6,1)>=SUBSTITUTE(LEFT(J$1,2),"-",)-0)* (OFFSET($A$2,,MATCH($I2,$B$1:$F$1,),6,1)<=SUBSTITUTE(RIGHT(J$1,2),"-",)-0)*(OFFSET($A$2,,MATCH($I2,$B$1:$F$1,),6,1)<>""),OFFSET($A$2,,MATCH($I2,$B$1:$F$1,)-1,6,1),"")) copy to L4

O2=AVERAGE(IF((OFFSET($A$2,,MATCH($N2,$B$1:$F$1,),6,1)>=SUBSTITUTE(LEFT(O$1,2),"-",)-0)* (OFFSET($A$2,,MATCH($N2,$B$1:$F$1,),6,1)<=SUBSTITUTE(RIGHT(O$1,2),"-",)-0)*(OFFSET($A$2,,MATCH($N2,$B$1:$F$1,),6,1)<>""),OFFSET($A$2,,MATCH($N2,$B$1:$F$1,),6,1),"")) copy to Q4 :)israel:wondering how you get "10.5" in Q3, (11+12)/2=10.5??)
 

Attachments

  • Capture.JPG
    Capture.JPG
    71.3 KB · Views: 11
Yeah sorry, Q3 - that's a typo...

Sorry for my ignorance but your Table 3 does not change if I change the scores in Table 1 and re-create the list.

Am I suppose to run something to get your Table 3 to update?

Thanks again
 
Last edited:
Table 3 does not change if I change the scores in Table 1 and re-create the list.

Am I suppose to run something to get your Table 3 to update?
I mentioned it's a pivot table; it needs refreshing: right-click it and choose Refresh.
Because it's a pivot table, if the size of source data changes, the source range of the pivot table needs to match the new list.
That and the refreshing of the pivot can be done automatically if you want. The only thing is, I've put the list beneath the original source data, and if that source data gets much bigger, it will overlap the new list. Of copurse, the new list can be placed anywhere.
 
Last edited:
So how could I get them to automatically update when I change the data in table 1?
 
In the attached I've moved the list a bit more out of the way and added one line to the macro to update the pivot table's source data and refresh the pivot.
 

Attachments

  • ExcelGuru10448Pulpil scores.xlsm
    26.6 KB · Views: 4
Back
Top