Doesn't matter. If you're going to be doing this in different places then
With Range("G2")
.Formula = "=SUMIF(C:C,F2,D:D)"
.AutoFill Destination:=Range(.Offset(0, -1), .Offset(0,
-1).End(xlDown)).Offset(0, 1)
End With
will do it and all you'll have to change is the first line and the
formula.