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
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 139 Industry Talk
- 471 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 495 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!