Given you're using XL2007 you can use SUMIFS function (not available pre XL2007)

A2: =SUMIFS(Sum,Account,B2,Type,C2)