Hello again,
i have a range named MATS (F9:F58)
and this formula in C9 and dragged down 20 rows
=IFERROR(INDEX(MATS, MATCH(MIN(IF(COUNTIF($C$8:C8, MATS)=0, 1, MAX((COUNTIF(MATS, "<"&MATS)+1)*2))*(COUNTIF(MATS, "<"&MATS)+1)), COUNTIF(MATS, "<"&MATS)+1, 0)), "")
this is a typical contents...