COUNTIFS or CONTAINS
Hello,
I'm trying to count the amount of projects a department has when another column is checked. The current formula I have keeps returning a "0" but I know there are four that need to be counted.
If Department is selected And Project is checked, what is the count?
=COUNTIFS({Projects}, true, {Supporting Department}, "Sales")
Not sure what I'm doing wrong, anyone have guidance?
Best Answer
-
What is the {Projects} column?
If you are note incorporating the {Projects} column anymore then the below would be your formula:
=COUNTIFS({Supporting Department}, HAS(@cell,"Sales"), {Status}, @cell="In Progress")
Answers
-
-
Thank you, but unfortunately, it is still returning a "0".
-
I suggest you double-check the column types - make sure "Projects" = Checkbox and that "Restrict to Checkbox Use Only" is toggled on, that there's no data other than check/not-checked in that column, and that "Supporting Department" = Text/Number. Also, I recommend you double-check references by right-clicking on the sheet and choose "Manage References" - make sure you're pointing at the right thing. The formula I'd write is quite similar to what everyone has said so far:
=COUNTIFS({Projects}, 1, {Supporting Department}, "Sales")
Good luck!
If this answer resolves your question, please help the Community by marking it as an accepted answer. I'd also be grateful for your response - "Insightful"or "Awesome" reactions are much appreciated. Thanks!
-
Thank you for your response. The "Supporting Department" is a dropdown list as multiple departments are allowed to be selected. Is there a way to write this where only one specific supporting department is counted?
-
Thank you. I tried that and it returned "0".
I did make a slight adjustment:
If "Supported Department" dropdown has a specific department selected, I want to count how many are in each status.
Here is what I tried with @DKazatsky2 's response:
=COUNTIFS({Supporting Department}, HAS("Sales", {Status}, "In Progress))
this returns a zero when there are projects that should be counted.
Thanks again for all the help!
-
@MMorgan maybe post a snapshot of your data with the rows you expect it to be counting.
Also, review your cross sheet references… are they set to the entire column?
-
Here is a screen shot of the two columns I'm using.
Status is a dropdown where there can only be one option and Supporting Department there can be multiple options.
Let me know if that helps, thanks.
-
What is the {Projects} column?
If you are note incorporating the {Projects} column anymore then the below would be your formula:
=COUNTIFS({Supporting Department}, HAS(@cell,"Sales"), {Status}, @cell="In Progress")
-
That is it! Thank you!!!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 67.2K Get Help
- 452 Global Discussions
- 155 Industry Talk
- 505 Announcements
- 5.4K Ideas & Feature Requests
- 85 Brandfolder
- 156 Just for fun
- 81 Community Job Board
- 514 Show & Tell
- 34 Member Spotlight
- 2 SmartStories
- 308 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!