Author: Oscar Cronquist Article last updated on February 06, 2018

Students are allowed to sign up to maximum two courses. How do I filter students who have signed up for more than 2 courses?

Array formula in B25:

=INDEX(tbl, SMALL(IF((COUNTIF(tbl, tbl)>=3)*(ISTEXT(tbl))*NOT((COUNTIF(\$B\$24:B24, tbl))), ROW(tbl)-MIN(ROW(tbl))+1, ""), 1), (SMALL(IF((COUNTIF(tbl, tbl)>=3)*(ISTEXT(tbl))*NOT((COUNTIF(\$B\$24:B24, tbl))), ((ROW(tbl)-MIN(ROW(tbl))+1)+(COLUMN(tbl)-MIN(COLUMN(tbl))+1)/16384)*1, ""), 1)-SMALL(IF((COUNTIF(tbl, tbl)>=3)*(ISTEXT(tbl))*NOT((COUNTIF(\$B\$24:B24, tbl))), ROW(tbl)-MIN(ROW(tbl))+1, ""), 1))*16384) + CTRL + SHIFT + ENTER

copied down as far as needed.

### Named ranges

tbl (B3:D21)
What is named ranges?

Return multiple values if above frequency criterion.xls
(Excel 97-2003 Workbook *.xls)

IF(logical_test;[value_if:true];[value_if_false])
Checks whether a condition is met, and returns one value if TRUE, and another value if FALSE

COUNTIF(range,criteria)
Counts the number of cells within a range that meet the given condition

SMALL(array,k) returns the k-th smallest row number in this data set.

INDEX(array,row_num,[column_num])
Returns a value or reference of the cell at the intersection of a particular row and column, in a given range

MIN(number1,[number2])
Returns the smallest number in a set of values. Ignores logical values and text

ROW(reference) returns the rownumber of a reference

COLUMN(reference)
returns the column number of a reference

ISTEXT(value)
Checks whether a value is text, and returns TRUE or FALSE

NOT(logical)
Changes FALSE to TRUE, or TRUE to FALSE