COUNTIFS Syntax
I am really struggling with COUNTIFS syntax and hope someone can shed light on what I am doing wrong.
I have 3 sheets. Sheet1 has assets from company a, Sheet2 has assets from company b and Sheet3 is my metrics sheet that has the COUNTIFS code.
On Sheet3, I have a COUNTIFS statement that is supposed to count the number of "In Stock" items from Sheet1 column 1 and Sheet2 column 1. The syntax is:
=COUNTIFS({Sheet1 Range 1}, "In Stock", {Sheet2 Range 1}, "In Stock")
The above code results in #INCORRECT ARGUMENT SET.
If I split the above code into two separate COUNTIFS statements, then there is no problem so I know the data is right.
Any suggestions?
Answers
-
Your issue is that the ranges are a different size, but even if the ranges were the same size, the outcome would not be what you are trying to get.
=COUNTIF({Sheet1 Range 1}, "In Stock")+COUNTIF({Sheet2 Range 1}, "In Stock")
the above should get what you are looking for.
-
Thank you! It makes perfect sense now as the ranges are different sizes.
-
As a note...
Even if they were the same size, you cannot use cross sheet references pointing at two different sheets within the same function.
-
Ah, very good to know.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 62.4K Get Help
- 364 Global Discussions
- 202 Industry Talk
- 430 Announcements
- 4.4K Ideas & Feature Requests
- 137 Brandfolder
- 129 Just for fun
- 128 Community Job Board
- 446 Show & Tell
- 28 Member Spotlight
- 1 SmartStories
- 284 Events
- 35 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!