This uses a helper row and includes non-unique values. In the helper row 8 C8 and across.
Formula:
=LARGE($4:$4,COLUMNS($C:C))
and array enter this in C10 and fill across until you get blanks or as far as you need.
Formula:
=IFERROR(INDEX($C$3:$Q$3,SMALL(IF(C$8=$C$4:$Q$4,COLUMN($C:$Q)-MIN(COLUMN($C:$Q))+1),COUNTIF($C$8:C$8,C$8))),"")
If you aren’t familiar with array-entered formulas array enter means the formula must be committed from edit mode by simultaneously pressing and holding down Ctrl and Shift while hitting Enter.
Bookmarks