I have a table that consists of 3 rows:
Every student is tested on different subjects, and his marks are written in the table.
In the "Mark" row, the cells' values are numeric. The marks can go between 1 to 100.
I want to look at each student's 3 last marks (regardless of the subject), and see whether there are 2 marks that are above 80. If positive, return true; If not - false;
For example:
-> returns true for John
But:
-> returns false for John
Thanks!
答案 0 :(得分:0)
You can use the COUNTIFS
function to check this.
If your marks are entered chronologically right to left, you can enter this formula in Cell A4 to flag if the Mark is in the last three (you will need to fill this formula right for all of your columsn):
=COUNTIFS($A$1:A1,A1)<4
If your marks are entered chronologically left to right, you can enter this formula in Cell A4 to flag if the Mark is in the last three (you will need to fill this formula right for all of your columsn):
=COUNTIFS(INDIRECT(CELL("address",A1)&":"&ADDRESS(1,COUNTA(1:1))),A1)<4
And then for each student, you could use this formula:
=COUNTIFS(1:1,"John",3:3,">80",4:4,TRUE)
If you had a list of the student names starting in Cell F1, you could use the formula below and fill down:
=COUNTIFS($1:$1,F1,$3:$3,">80",$4:$4,TRUE)
Edit: included variations for Marks entered left to right and right to left.