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
- 64K Get Help
- 412 Global Discussions
- 220 Industry Talk
- 459 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 138 Just for fun
- 57 Community Job Board
- 459 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 298 Events
- 37 Webinars
- 7.3K Forum Archives