View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Toppers Toppers is offline
external usenet poster
 
Posts: 4,339
Default Summing and multiplying for multiple criteria

With data in columns A to C:

=SUMPRODUCT(--($A$2:$A$9={100,200})*($B$2:$B$9)*($C$2:$C$9))

=SUMPRODUCT(--($A$2:$A$9={100,200})*($C$2:$C$9))

"Ed" wrote:

I need to sum a column that meets two criteria definitions - such as two
different customers (the condition data is in the same column).

I also need to multiply two fields together based upon the same criteria -
to include the two customers that meet the criteria in my product sum. Again
the customer info is in the same column.

Such as multiplying price * qty for customer #'s 100 and 200. Also, summing
qty for customer #'s 100 and 200.

Customer Price Qty
100 1.50 10
200 3.00 50
100 5.00 5
300 1.25 100
100 6.00 75
200 3.30 15
400 4.50 10
300 2.25 60