OK, the tweak you made was causing a problem but after seeing your data layout I made a little tweak to the formula as well (makes it more efficient).
Array entered** in P3 and copied down:
=IFERROR(INDEX(A$2:K$2,MATCH(TRUE,COUNTIF(OFFSET(A3,0,COLUMN(A$2:K$2)-MIN(COLUMN(A$2:K$2)),1,3),1)=3,0)),"")
** array formulas need to be entered using the key
combination of CTRL,SHIFT,ENTER (not just ENTER).
Hold down both the CTRL key and the SHIFT key
then hit ENTER.
Here's your updated file:
First instance(2).xlsx
Bookmarks