Avatar of LN41
LN41
 asked on

Excel - how to count and filter

I have a spreadsheet with City, Event Date, and Attendance as columns. I want to report the number of attendees for each city for each quarter. Is there a way to collect all attendees for a city and then only count the values in a certain date range like quarterly? Attached is an example that better illustrates the challenge.
test.xlsx
Microsoft Excel

Avatar of undefined
Last Comment
LN41

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
dlmille

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
barry houdini

Hey Dave, you were too quick for me......!

I was just about to post a SUMIFS solution so here it is anyway

=SUMIFS(C5:C9,A5:A9,"Seattle",B5:B9,">="&DATE(2012,1,1),B5:B9,"<"&DATE(2012,4,1))

That's basically the same thing as Dave suggests except I "hardcoded" the date range in the formula. You could even use cell references which contain dates, so with start date in E2 and end date in F2 that could be

=SUMIFS(C5:C9,A5:A9,"Seattle",B5:B9,">="&E2,B5:B9,"<"&F2)

regards, barry
aikimark

calendar quarter or fiscal quarter?
LN41

ASKER
calendar
Your help has saved me hundreds of hours of internet surfing.
fblack61