Reputation: 37
I have this data set (example)
It shows different responses for different towns and what industries the respondent thinks has job openings (e.g Akron has 2 rows (2 respondents), with different industries given)
Now I want to chart/gather from that data set, the count of each industry for each town: So using this table setup, I want a formula that shows, for example, how many times "restaurant" was listed for Akron...
So here's what I want a formula to give me, in cell B63, ("Akron" row, "restaurant" column) for ex. This is paraphrasing in plain English what I want it to do. I have tried countless variations of COUNTIFS, IFS, MATCH, SUM, INDIRECT, LOOKUPS... etc and have not been able to get the numbers that reflect the data given.
=count if ("restaurant" appears in the range B53:D60 AND if those occurrences are in rows starting with "Akron" (in the range A53:A60))
The main hang-up, obviously is that these 2 different criteria encompass 2 different sized ranges (not something countifs like...) So how can I get around that barrier?
A final note: the imgs/ex given are small representations of a much larger range that I'm actually working on... so yes, I could make a nifty formula for each town that has just the town rows as my range...(COUNTIF likes this approach!) but I've got many more towns of various row counts... it takes too long to make a town specific range or diff formula for each town... I prefer 1 formula that looks through all the town rows/range and all the "Industries" range...
Upvotes: 0
Views: 216
Reputation: 43
=COUNTIF(FILTER(DATA_RANGE,TOWN_NAME="TARGET_TOWN_NAME"),"=TARGET_INDUSTRY")
Example use
=COUNTIF(FILTER(A2:C,A2:A="A"),"=1")
Counts the responses of 1 under town A.
Upvotes: 1