Incorrect Argument Set
I am running in to an error on a metric sheet i have created which has me stumped.
On some cells it is working and on others I am getting #INCORRECT ARGUMENT SET
I have literally just dragged the formula. and if I change my $[SOURCE FROM]$2 column to another branch, different cells in the bottom snip show #INCORRECT ARGUMENT SET, for instance in the snip it shows row 3 as incorrect but if i change the branch row3 is as a value but row4 is incorrect....
=IFERROR(COUNTIFS({Nature}, [Primary Column]3, {Branch}, $[SOURCE FROM]$2, {Injury Date}, IF(AND(MONTH(@cell) = $[Last Month]$1, YEAR(@cell) = YEAR([First Day of Last Month - Full Date]1)))), 0)
Best Answer
-
I would break it out into multiple statements. So something like:
=IFERROR(COUNTIFS({Nature}, [Primary Column]3, {Branch}, $[SOURCE FROM]$2, {Injury Date}, MONTH(@cell) = $[Last Month]$1, {Injury Date}, YEAR(@cell) = YEAR([First Day of Last Month - Full Date]1), 0)
Answers
-
I think it's going to have to do with your IF statement in the middle of your COUNTIFS statement. Essentially you're saying that the Injury Date has to match another date to allow the count to happen. But the other date is being determined by an IF statement with no True or False return. It would look like you're doing this:
Injury Date (11/23/2020) is = to __
So the only time you get a return is when you encounter an error. You need to return something from your IF statement. Something like IF(month and year match your criteria, {on true} return date, {on false} return a 0)
-
I didn't even think about that, thank you. However, now I am lost as to how I should formulate this.
I tried
but this didn't work either I am getting an invalid data type error now.
-
I would break it out into multiple statements. So something like:
=IFERROR(COUNTIFS({Nature}, [Primary Column]3, {Branch}, $[SOURCE FROM]$2, {Injury Date}, MONTH(@cell) = $[Last Month]$1, {Injury Date}, YEAR(@cell) = YEAR([First Day of Last Month - Full Date]1), 0)
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 139 Industry Talk
- 472 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 496 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!