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
 

Some videos you may like

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest

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
 

Watch MrExcel Video

Forum statistics

Threads
1,118,760
Messages
5,574,074
Members
412,566
Latest member
TexasTony
Top