Countifs, Date Functions and Text Criteria
I am putting together two sets of formulas so I can capture the number of tasks within a certain year and month, and another set to see which of those are completed.
My formula that works to capture the number of tasks is (in this example, January 2024:
=COUNTIFS({GA Date}, IFERROR(MONTH(@cell), 0) = 1, {GA Date}, IFERROR(YEAR(@cell), 0) = 2024)
Now, I want to make a new formula to see if the Status is "Completed":
=COUNTIFS({GA Date}, IFERROR(MONTH(@cell), 0) = 1, {GA Date}, IFERROR(YEAR(@cell), 0) = 2024, {Status}, "Completed")
Now I am receiving an INCORRECT ARGUMENT SET error and not sure why. Both column ranges are the same, and I don't see any missing arguments or extra functions (as the documentation says).
Best Answer
-
@James Tontarski I would move around you criterion, just to keep your nested formulas at the end. Then I would ask does your Status column on your other sheet have a formula that may be returning in error. If you have errored cells in your formula reference data, it will cause issues with your formula unless you have the IFERROR callout.
=COUNTIFS({Status}, "Completed",{GA Date}, IFERROR(MONTH(@cell), 0) = 1, {GA Date}, IFERROR(YEAR(@cell), 0) = 2024)
Edited to fix my formula mistake.
Answers
-
@James Tontarski I would move around you criterion, just to keep your nested formulas at the end. Then I would ask does your Status column on your other sheet have a formula that may be returning in error. If you have errored cells in your formula reference data, it will cause issues with your formula unless you have the IFERROR callout.
=COUNTIFS({Status}, "Completed",{GA Date}, IFERROR(MONTH(@cell), 0) = 1, {GA Date}, IFERROR(YEAR(@cell), 0) = 2024)
Edited to fix my formula mistake.
-
Thanks @JamesB, rearranging the criterion worked. The Status column in the other sheet has no formulas, just text.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.8K Get Help
- 434 Global Discussions
- 138 Industry Talk
- 470 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 65 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!