If you use a helper column off to the far right outside the print area (let us
use F for now) and have that helper column =C+A+B (so it equals
ID+person+date), then you will have a unique identifier for each transaction.
Using your 6-row sample data below in rows 2:7, then
F2 =C2+A2+B2
then use your fill handle to drag that formula on down.
Assuming your expected result table begins with 99204 in cell A10,
B10 =SUM(($C$2:$C$7=$A10)/COUNTIF($F$2:$F$7,$F$2:$F$7&""))
Now that is an array formula and must be committed using Ctrl+Shift+Enter,
not just Enter. If you do it right, Excel will put curly braces {} around
the formula for you.
Then C10 is a normal formula (so just use Enter to commit it):
C10 =SUMIF($C$2:$C$7,$A10,$D$2:$D$7)
You'll notice that 31235 returns an answer of $290, not $190, but I believe
that is the correct answer based on your sample data.
Just modify the above ranges to what you need, but be sure to keep dollar
signs so that you can then use your fill handle to drag formulas down as far
as needed.
--
Please remember to indicate when the post is answered so others can benefit
from it later.