In D2 enter this formula:
=INDEX('Prize kopie'!$C$1:$AC$1,SMALL(IF('Prize kopie'!$C2:$AC2=C2,COLUMN('Prize kopie'!$C2:$AC2)-COLUMN('Prize kopie'!$C2)+1),COUNTIF($C2:C2,C2)))
confirmed with CTRL+SHIFT+ENTER keys.
Then copy down.
Then select from D2:D20 and copy, then paste to top of each column afterwards.
See attached.
Note: to remove errors, change the SMALL() formula in C2 to:
=IF(ISERR(SMALL('Prize kopie'!C2:AC2,1)),"",SMALL('Prize kopie'!C2:AC2,1))
and copy down and do similar for the other columns... then the formula I gave in D2 would now be:
=IF(ISERR(SMALL('Prize kopie'!C2:AC2,1)),"",SMALL('Prize kopie'!C2:AC2,1))
confirmed with CTRL+SHIFT+ENTER and copy down, then copy column to other columns as before.
I fixed column C and D for you in the attachment.
Bookmarks