View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dominik Petri Dominik Petri is offline
external usenet poster
 
Posts: 15
Default Want to do sum by Acct Subacct

Hi Sandy,

you could use SUMPRODUCT.

If your data is in A2:D7 (headers are in row 1) and your sums start in
row 10, then use this formula in C10:

=SUMPRODUCT(--($A$2:$A$7=$A10), --($B$2:$B$10=$B10), --($C$2:$C$10)) to
calculate the Debit Amount.

Copy the formula to D10 and you have the credit amount.

HTH,
Dominik.



Sandy schrieb:
I have an excel sheet wehre I have the followign coloums e.g below. I
wanted to get some kind of furmula or function that would let me do a sum
by every unique Acct\Subacct Combo

Acct Subacct DebitAmount CreditAmount
100 800 1000
100 800 4000
100 800 9000
100 1250 1400
100 1250 1600
100 1250 3000


So basically my sum would be

Acct Sub DebitAmount CrediAmount
100 800 5000 9000
100 1250 3000 3000

As there are thousands of lines I cant manually do this. I would
apprecaite if someone cas assist

Thanks in advance
Sandy