I need a productif type function

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to search a range of cells, say C:C for a value, if that value is
there i want to multiply the corresponding B cell and D cell together then
sum up all of the true values. If anyone can help me please let me know.

Thanks
 
=SUMPRODUCT((C1:C999="something")*(B1:B999)*(D1:D999)

Unfortunately, SUMPRODUCT does not work with whole columns (C:C)

HTH
 
That seems to work, the only problem is that some of the B and D cells have
no value so this functions returns a #VALUE! error. Thanks for your help
 
It isn't no value that would cause this. It must be a #VALUE or text in the
cells. Either sort the data or try

=SUMPRODUCT(--(C1:C999="something"),(B1:B999),(D1:D999))

--
HTH

Bob Phillips

(remove xxx from email address if mailing direct)
 
That works just how I wanted it...thanks a ton!
Bob Phillips said:
It isn't no value that would cause this. It must be a #VALUE or text in the
cells. Either sort the data or try

=SUMPRODUCT(--(C1:C999="something"),(B1:B999),(D1:D999))

--
HTH

Bob Phillips

(remove xxx from email address if mailing direct)
 
I ended up using this
=IF(SUMIF(C2:C41,"Winter 2006",E2:E41)>0,(SUMPRODUCT(--(C1:C41="Winter
2006"),(B1:B41),(E1:E41))/SUMIF(C1:C41,"Winter 2006",B1:B41)),"")

that included a dividing by the same sums of the B values and it works
great. Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top