Conditional formatting question

Copper Contributor

Have a specific question for analyzing subgroups, I'm not sure if this falls into a conditional formatting category, but here it goes. Here's a hypothetical for what I'm trying to do.

 

I have three columns of data in my worksheet

 

Customer age (quantitative)

Favorite Ice Cream Flavor (qualitative)

Number of scoops of Ice cream purchased (quantitative)

 

I want to ask excel the following questions:

 

1) How many customers under the age of 10 years old favor chocolate ice cream?

2) How many customers under the age of 10 years old buy 2 scoops of chocolate ice cream?

3) How many customers under the age of 10 buy 3 or more scoops of chocolate ice cream?

3) How many customers under the age of 10 buy 3 or more scoops of chocolate or vanilla ice cream?

 

Attached excel sheet for visuals if  needed.

Any help would be appreciated!

1 Reply

Hi Fred,

 

SUMPRODUCT could help.

=SUMPRODUCT((A2:A23<=10)*(B2:B23="chocolate"))
=SUMPRODUCT((A2:A23<=10)*(B2:B23="chocolate")*(C2:C23=2))
=SUMPRODUCT((A2:A23<=10)*(B2:B23="chocolate")*(C2:C23>=3))
=SUMPRODUCT((A2:A23<=10)*(B2:B23="chocolate")*(C2:C23>=3))+SUMPRODUCT((A2:A23<=10)*(B2:B23="vanilla")*(C2:C23>=3))