Hello, hoping someone can help me. I need an enhanced formula but I'm struggling.
I currently have this formula on a cell:
=COUNTIFS(Q31:Q301,"Joe Bloggs",H31:H301,"Fail")
This cell taking the range Q31:Q301 and looking for references of Joe Bloggs. When it finds Joe Bloggs it looks at the adjacent column (H31:H301) and on the adjacent row it sees if they passed or failed the test. The formula then outputs the number of fails attributed to Joe Bloggs in the given cell.
Each row on the spreadhseet is a CSV output of a person's pass or fail on a test.
However, in the next cell to the above formula (outputting the number of fails of Joe Bloggs), I need to expand this to look at column 'I'. Column 'I' range (I31:I301) which shows the type of subject the user failed on. I need to output to this next cell the type of test Joe Bloggs failed most on (eg Maths). The formula therefore looks for Joe Bloggs + Fails + outputs the subject that appears most linked to fails of Joe Bloggs.
An example of the structure would look like this:
Joe Bloggs | Pass | English
Ann Example | Fail | French
A.N.Other | Pass | English
Joe Bloggs | Fail | Maths
Ann Example | Fail | French
Ann Example | Fail | French
Joe Bloggs | Fail | Maths
A.N.Other |Fail | English
Joe Bloggs | Fail | Maths
Joe Bloggs | Fail | French
Joe Bloggs | Pass | Maths
In this simplified example, my formula at top would output '4' to my chosen cell (because there are 4 fails linked to Joe Bloggs), but I'm looking for the next cell to output the subject (from the range in column 'I') of which the user has failed most (in this example, this next cell would output "Maths")
Then, in the cell after that, (ok, I'm asking a lot now) to show the second most 'Fail' of a given user ('English' in the above example for Joe Bloggs).
Lastly, IF there is more than 1 value to output based on equal max count (eg Joe Bloggs had failed French twice and also Maths twice and those were the highest values), could the cell output both values 'Maths/French').
Also, if the user didn't fail any subjects and therefore the output of most failed subjects can't work, then for there not be an error or value!! message showing in the cell (just be empty if possible).
Thanks so much for any help anyone can provide.
PJ
Bookmarks