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 does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
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
 
Upvote 0

Forum statistics

Threads
1,215,635
Messages
6,125,945
Members
449,275
Latest member
jacob_mcbride

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
Back
Top