If you just put the names into F3 and F4, you can simplify anzafsa's formula and your effort with

=SUMIF(D:D, F3, C:C) copied down