What if row 7 has 66 in math and English?
If account for duplicates then try this formula below.
Input formula in cell G4 and copy across and copy down.
=INDEX($B$3:$E$3,SMALL(IF($B4:$E4=$F4,COLUMN($B4:$E4)-COLUMN($B4)+1),COLUMN(A4)))
Or if don't like to see the formula errors then input formula in cell G4 and copy across and copy down
=IF(COUNTIF($B4:$E4,$F4)>=COLUMNS($G$4:G4),INDEX($B$3:$E$3,SMALL(IF($B4:$E4=$F4,COLUMN($B4:$E4)-COLUMN($B4)+1),COLUMN(A4))),"")
Both formulas are arrays. Paste the formula in cell G4 double click inside the cell and hold down.
Ctrl,Shift,Enter
Hope it helps!
Bookmarks