PDA

View Full Version : [SOLVED:] Product if...



tkaplan
04-21-2009, 12:11 PM
I know I've done this before....I'm just drawing a blank as to how.....
column A is numbers. Column B is "yes" or "no".
I want to multiply all the values in column A that the corresponding column B is "yes". i know there's a "sumif" function if I wanted to add them together, but I need to multiply.

thanks in advance....

mdmackillop
04-21-2009, 12:51 PM
=PRODUCT((A1:A6)^(--(B1:B6="yes")))
Enter as an array formula

tkaplan
04-21-2009, 01:06 PM
thank you!
can you explain this formula to me? what does the "--" mean?

mdmackillop
04-21-2009, 01:11 PM
See example
You don't really need --; force of habit!

=PRODUCT((A1:A6)^(B1:B6="yes"))

tkaplan
04-21-2009, 01:27 PM
very cool! learned a lot from that example. thank you!