I am using the below formula as an array to find values from the sheet 'paste' in column T which has numeric values by looking up two sets of values in two colums and ten returning the matching result.

{=IFERROR(INDEX($C$1:$C$4,MATCH($D$2&$E$2,$A$1:$A$4&$B$1:$B$4,0)),"")}

This works fine but i wish for any values that have the same lookup criteria to be added together so for example

A B C d2=1 e2=1
1 1 blank
1 3 8
1 1 5
1 1 3

So in cell d1 I have the value '1' and in cell E2 I have the value '1' also so the MATCH will find the first rown and return a blank but i need it to also find row 3 and row 4 add the results together (blank + 5 +3) should return 8.

Many thanks
Kevin