Sum values associated with most frequently occurring text

Range Reference:
Sum Range:
Formula:

=SUMIF(B5:B11,INDEX(B5:B11,MODE(MATCH(B5:B11,B5:B11,0))),C5:C11)

=SUMIF(B5:B11,INDEX(B5:B11,MODE(MATCH(B5:B11,B5:B11,0))),C5:C11)