That formula is correct, and is returning a 0 because you have 1 or more blank cells in C4:C28. Here's an updated formula using the ranges provided that will prevent the formula from looking at blank cells. This should go in C30 and get copied down:
=IFERROR(INDEX($C$4:$C$28,MATCH(1,INDEX((COUNTIF($C$4:$C$28,$C$4:$C$28)=LARGE(INDEX(COUNTIF($C$4:$C$28,$C$4:$C$28),),1+SUMPRODUCT(COUNTIF($C$4:$C$28,$C$29:C29))))*(COUNTIF($C$29:C29,$C$4:$C$28)=0)*($C$4:$C$28<>""),),0)),C29)