Countifs with Different Named Ranges
Hello again all! I've run into an #INCORRECT ARGUMENT SET when trying to reference two ranges in a countifs() function.
I believe the error is because my Project Range only references to one column, and my {Visits} range includes 12 columns (so for functions that take two ranges: the range sizes don’t match for the function).
{Projects} = Project Column on project visits sheet
{Visits} = Visit 1:Visit 12 columns on the project visits sheet
What I was trying to do do was count all visits in the month of May for the year 2019 that were related to the project in that row. Before I added the additional condition of which project I was referencing the formula worked as expected. Then it broke with the project criteria (do to what I presume was the different range size).
Does anyone have any alternate suggestions to help me out?
Thanks!
Best Answer
-
The issue is that your range sizes do not match. You would need to add together 12 SUMIFS (1 for each of the Visit columns), or you can add 12 helper columns that contain a very basic
"=Project@row"
to duplicate that data into a 12 column grid that matches the same size as your Visit columns.
Answers
-
Hi,
I think there is simply a logical condition missing.
=COUNTIFS({Project}, =Project@row...
Hope this helps
Stefan
Smartsheet Consulting, Solution Building, Training and Support.
Projects for Processes and for People.
-
Hi @Stefan , thanks for the weekend reply! I tried your suggestion, but unfortunately still have the same issue.
-
The issue is that your range sizes do not match. You would need to add together 12 SUMIFS (1 for each of the Visit columns), or you can add 12 helper columns that contain a very basic
"=Project@row"
to duplicate that data into a 12 column grid that matches the same size as your Visit columns.
-
Hi,
same thoughts here, so I second Pauls excellent post.
Sigh, stopped reading before my fist post when I saw the missing condition ;-)
Greetings
Stefan
Smartsheet Consulting, Solution Building, Training and Support.
Projects for Processes and for People.
-
@Paul Newcome thank you sir!
-
Ah, never new this. Always something to learn. Thanks :-)
Smartsheet Consulting, Solution Building, Training and Support.
Projects for Processes and for People.
-
Sure thing. It is more of a personal preference than a necessity. I personally only use the = if I am also using an @cell reference. It is just what I am used to. Same with the greater or less than arguments. If I include one of those then I have to use "@cell" as well or it bugs me. Haha.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 439 Global Discussions
- 138 Industry Talk
- 471 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 488 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!