Incorrect Argument Set

Options

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

Answers

  • David Tutwiler
    David Tutwiler Overachievers Alumni
    Options

    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)

  • Jenna Bailey
    Jenna Bailey ✭✭✭✭✭
    Options

    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.

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!