Summarize two columns
I'm trying to count the # of instances based on criteria from two columns. I must be missing something from my formula. I'm trying to count the total how many times "SRC" objectives there are that do not have a status of Blue. So, I want it to count statuses with "Red, Green, and yellow" where the business vertical column contains "SRC" in the same row.
=COUNTIF([Business Vertical]11:[Business Vertical]80, HAS(@cell, "SRC") + COUNTIF(Status11:Status90, NOT(@cell, "blue")))
Best Answer
-
2 Things:
- When entering multiple criteria you need to use COUNTIFS
- In your formula the status range was a different size then the Business Vertical range.
See below corrected formula:
=COUNTIFS([Business Vertical]11:[Business Vertical]90, HAS(@cell, "SRC"), Status11:Status90, NOT(@cell = "Blue"))
Answers
-
Your ranges should be the same size. The [Business Vertical] range goes to row 80, but the Status range goes to row 90.
-
2 Things:
- When entering multiple criteria you need to use COUNTIFS
- In your formula the status range was a different size then the Business Vertical range.
See below corrected formula:
=COUNTIFS([Business Vertical]11:[Business Vertical]90, HAS(@cell, "SRC"), Status11:Status90, NOT(@cell = "Blue"))
-
I completely misread the original formula. While you will need the COUNTIFS as mentioned above to accomplish what you are wanting to do, the problem with the original formula is the parenthesis. The first COUNTIF isn't closed off before adding the second COUNTIF.
-
Thank you both. @Leibel S the formula worked perfectly and I ensured ranges were the same. Thanks @Paul Newcome
-
Happy to help. 👍️
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 63.1K Get Help
- 380 Global Discussions
- 212 Industry Talk
- 442 Announcements
- 4.6K Ideas & Feature Requests
- 140 Brandfolder
- 129 Just for fun
- 130 Community Job Board
- 450 Show & Tell
- 30 Member Spotlight
- 1 SmartStories
- 289 Events
- 34 Webinars
- 7.3K Forum Archives