Hi,
As my first post, I would like to say that so far this forum has been a tremendous help for me in figuring out some tricky business regarding Excel, thank you.
Now, to outline a problem I am facing now, along with how I currently do it...
I am sent a record of about 25,000 students which includes details such as their student number, the subject they have studied, and the grade they achieved for that subject.
I am then asked to find all the students who have failed the same unit twice, as this requires further action from school administration.
Now, at the moment I use a function like this:
=IF(AND(F3=F4,A3=A4, OR(G3="F", G3="F-IN"), OR(G4="F", G4="F-IN")),"Failed the same unit twice","")
Admittedly, it is quite clumsy. For it to work, prior to typing in the function I must order the whole spreadsheet first by student number (column F), and then by their subject code (column A).
It may be clear to you that in doing that, I will now have each student and the units they study in sequential order, so if they have done the same unit twice, their results (column G) can be compared to see if there are fails or not. You may note in my above code a student can fail in two ways, F or F-IN.
In the cell I have that formula in, it says 'Failed the same unit twice' if they have failed twice, otherwise it stays blank.
I can then Filter the results if I want, only displaying the 'Failed the same unit twice' students which I can then copy and paste into a new sheet to give to administration.
Can anyone think of a more efficient way of completing this? It would be great if there was a code with 3 variables declared right at the top, 'U', 'S', and 'G' (unit, student, grade) so I could change them to suite the particular layout of the spreadsheet I am given (for example if column X was the student number I could define the variable 'S' as 'X'...?).
One of the main challenges is that I cannot think of ways to complete the task without manually sorting the results, as explained above. Perhaps a code/macro can do that for me?
I'd love some direction/help/suggestions for this task,
ouamarc
As my first post, I would like to say that so far this forum has been a tremendous help for me in figuring out some tricky business regarding Excel, thank you.
Now, to outline a problem I am facing now, along with how I currently do it...
I am sent a record of about 25,000 students which includes details such as their student number, the subject they have studied, and the grade they achieved for that subject.
I am then asked to find all the students who have failed the same unit twice, as this requires further action from school administration.
Now, at the moment I use a function like this:
=IF(AND(F3=F4,A3=A4, OR(G3="F", G3="F-IN"), OR(G4="F", G4="F-IN")),"Failed the same unit twice","")
Admittedly, it is quite clumsy. For it to work, prior to typing in the function I must order the whole spreadsheet first by student number (column F), and then by their subject code (column A).
It may be clear to you that in doing that, I will now have each student and the units they study in sequential order, so if they have done the same unit twice, their results (column G) can be compared to see if there are fails or not. You may note in my above code a student can fail in two ways, F or F-IN.
In the cell I have that formula in, it says 'Failed the same unit twice' if they have failed twice, otherwise it stays blank.
I can then Filter the results if I want, only displaying the 'Failed the same unit twice' students which I can then copy and paste into a new sheet to give to administration.
Can anyone think of a more efficient way of completing this? It would be great if there was a code with 3 variables declared right at the top, 'U', 'S', and 'G' (unit, student, grade) so I could change them to suite the particular layout of the spreadsheet I am given (for example if column X was the student number I could define the variable 'S' as 'X'...?).
One of the main challenges is that I cannot think of ways to complete the task without manually sorting the results, as explained above. Perhaps a code/macro can do that for me?
I'd love some direction/help/suggestions for this task,
ouamarc