=SUMIF($A$2:$A$25,$G2,$C$2:$C$25)

I am too impatient and hasty