I have five columns and I want to add up the Wages for each person on each date, so I used a formula
=SUMIFS($C$2:$C$11,$A$2:$A$11,"=" & A2, $B$2:$B$11,"=" & B2). But then I got duplicates because it added all the wages for all days for each date instead of doing it for the first occurrence and then making the rest equal to zero. I need a better formula that sums the dates up and makes the follow up numbers equal zero. For example Name A on 1/1/2016 shows up twice and should equal to 7(5+2) on the day he gets paid 5 and should equal 0 on the day he gets paid 2. Sorry for taking up your time and thank you in advance.

Name- Date -Wage -It should be -What I get after I use the formula
a- 1/1/2016- - 5 - -7- - 7
b- 1/3/2016- - 8 - -8 - - 8
c- 1/4/2016- - 1 - -1 - - 1
c- 1/2/2016- - 1 - -1- - 1
a- 1/1/2016- - 2 - -0- - 7 WRONG
d- 1/1/2016- - 6 - - 6 - - 6
b- 1/3/2016- - 0 - -0 - - 8 WRONG
b- 1/5/2016- - 3 - - 3 - - 3
c- 1/2/2016- - 0 - - 0- - 1 WRONG
a- 1/22/2016- - 8 - - 8- - 8