Exam class organiser

lordyosch

New Member
Joined
Feb 15, 2015
Messages
3
Hi,

I've been wracking my brain for this and googling to no success

I need to schedule a high school year group's revision classes. Allocation is based on target grades.
I want students who have a Grade D to be assigned to a list

I've tried using index based formulae to return class names but it isn't working for me.

MathsEnglishScienceFrench
BillABDF
BobBDDC
TonyDFFD
SueAAAA

<tbody>
</tbody>
So, I want the formula to return Science for Bill
English and Science for Bob
Maths and French for Tony
Nothing for Sue.


Can you guys help me?

Thanks,

Jay
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Enter in F2 and copy down:
Code:
=SUBSTITUTE(TRIM(IF(B2="D",B$1,"")&" "&IF(C2="D",C$1,"")&" "&IF(D2="D",D$1,"")&" "&IF(E2="D",E$1,""))," "," and ")
 
Upvote 0
That's great, thank you! I've never had cause to use substitute or trim before!

Can I be awkward and add an additional criterion?

Could the 'responses' be in consecutive columns?

Eg, the response for Tony would be [F4]Maths [G4]French -ignoring the columns containing other grades?

Thank you,

Jay
 
Upvote 0
This is a CSE formula for F2 - you need to confirm it by holding down Ctrl-Shift-Enter simultaneously, do not just hit the enter key:
Code:
=IF(COUNTIF($B2:$E2,"D")>=COLUMNS($B2:B2),INDEX($B$1:$E$1,SMALL(IF($B2:$E2="D",COLUMN($B2:$E2)-COLUMN($B2)+1),COLUMNS($B2:B2))),"")
Now copy it down to F5.
Now select F2:F5 and copy across.

If your actual data has more columns of classes than your sample data, modify the formula by changing the four instances of $E to your last actual column (preceded by a $). Then place the formula in row 2 of any column to the right of that last column making sure to confirm with Ctrl-Shift-Enter. Finally, copy the formula down and then select all formulas in that column and copy across. If you need help adapting the formula, let me know which columns and rows contain your actual data.

This link may help in understanding what the formula is doing, although it's oriented towards a result from a single column rather than a single row:
BET: Microsoft Excel Functions Advanced - INDEX & SMALL - Particular Occurrence
 
Upvote 0
Fantastic!

That's EXACTLY what I was after!

Thank you so much


(The actual data set contains 207 students studying about 10 each from 23 subjects!)
 
Last edited:
Upvote 0

Forum statistics

Threads
1,216,102
Messages
6,128,847
Members
449,471
Latest member
lachbee

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