View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Tevuna Tevuna is offline
external usenet poster
 
Posts: 136
Default Combine SUMIF and SUMPRODUCT

1) My question is if Excel provides a way to do it all in a single cell.
2) When creating a new porduct column, column D, the SUMIF rather then
SUMPRODUCT should be used. I'm I missing something here?
3) What are the double negative signs (--) that you and many other folks
here are using?

"Mike H" wrote:

Why not do your multiplication on the worksheet in d1 and then use:-

=SUMPRODUCT(--(A1:A4="Category 1"),(D1:D4))

Mike

"Tevuna" wrote:

Here is how the data is setup:

A B C
Type Qt. Rate
Category1 5 $10.00
Category2 6 $2.00
Category1 .5 $.50
Category2 10 $7.00

Here is the objective:

Calculate total amount, by mulitplying Qt. and Rate, if Category = category1
SUMPRODUCT doesn't take an argument for condition, and SUMIF can't multiply.
Is there a formula that combines them both?