This can be done using SUMPRODUCT . Update ranges as you wish
=SUMPRODUCT(($A$2:$A$7=A2)*($B$2:$B$7=B2)*$C$2:$C$7)
A2: A7 = name range
B2: B7 = name range
C2: C7 = range of numbers
Here all names with the same name and surname will be found and the numbers in the numbers column are summed
source share