How do I count if condition in Range A and if condition in B

Bob Katin

New Member
Joined
Nov 28, 2003
Messages
6
I have an Excel Spreadsheet and in which I have listed if people are attending the pot luck in cell C3 through C66 (yes, no, maybe). I have listed in cell D3 through D66 what they were asked to bring (main dish, side dish, dessert, beverage). I have counted the number of attendees in cell C67 by =COUNTIF(C1:C66,"yes"). I wanted to write a similar count if they have RSVP'd to come =COUNTIF(C1:C66,"yes") AND if they are bringing beverage in cell D1 through D66, than put the number in cell C68. Like wise put the number of desserts in cell C69 for those that are "yes", side dishes in cell C70, and main dishes in cell C71.

Is there a way to do this with Excel?

Thanks,
Bob
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.

XLGibbs

Well-known Member
Joined
Feb 25, 2005
Messages
2,446
in C68

SumProduct(--(C1:C66 ="yes"),--(D1:D66 ="beverage"))

in C69


SumProduct(--(C1:C66 ="yes"),--(D1:D66 ="dessert"))


the ranges for each side of the equation need to be the same size, so these formulas as written should work. Adjust the text in the 2nd half as needed.

The result will be a value matching the total meeting both criteria
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,437
Messages
5,831,625
Members
430,077
Latest member
CoulterM

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top