View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
sean_f sean_f is offline
external usenet poster
 
Posts: 16
Default Get subtotal by two criteria programmatically

Hi all,
what would be the best way to get a subtotal by multiple criteria
programmatically in the following situation?

I have a table (see below) which contains currency, date and value
columns.

I need to sum the value by the criteria date and currency

Curr Date Value
AUD 04/03/2006 -19077135
AUD 04/03/2006 18841290
AUD 04/05/2006 2400000
AUD 04/05/2006 12351998
CAD 04/05/2006 -5995905
CAD 04/05/2006 -5846000
CAD 04/06/2006 -33142536
CAD 04/06/2006 33142536
CHF 04/03/2006 -216352698
CHF 04/03/2006 209201801
CHF 04/04/2006 -215217476
CHF 04/04/2006 -1132500


For example in the table above I need to get the sum of all aussie
dollar transactions on the 3rd of april, then the sum of all aussie
dollar transactions on the 5th of april.
I need to repeat this for the canadian and swiss currency transactions
given.
I have tried using individual loops for defined currencies, but I
wonder if there is a more legant solution,

Many Thanks

sean F