Here's one way, try this in J6
=C6, then in J7
=IF(C7=C6,"",C6) copy down column J, then in K6
=SUMPRODUCT(--($C$6:$C$72=J6)*($H$6:$H$72)) copy down column K
This will total against each change of account number, where no account number zero, then copy > paste special values and sort column J & K by J
Bookmarks