#INCORRECT ARGUMENT SET

Options


Hi Team,

I am trying to fix this formula but it keeps giving me an error #INCORRECT ARGUMENT SET

Could you please help me fix this one it's kind of urgent to close.

=IF([Calculation of Receivd to Warehouse]@row >= 31, "Delayed", IF([Calculation of Receivd to Warehouse]@row <= 30, "Expected next 30 Days", "Green", IF([Calculation of Receivd to Warehouse]@row <= 0, "To Warehouse next 30Days", "Yellow")))

Best Answer

  • Brian_Richardson
    Brian_Richardson Overachievers
    Answer ✓
    Options

    @Shubha couple of things going on... you're missing a , after "Yellow", but also you still have too many arguments in the function. IF works with criteria,true result,false result. You have criteria, true result,false result,something else.

    It also looks to me like you're trying to set "Expected next 30 Days" or "To Warehouse" etc in one cell, and a color status "Red", "Yellow" etc in a different cell? You cannot do that with a single formula. You need a formula in each column that you're trying to set.

    Also nested IF statements check conditions in the order that you list them, and when they are true then the whole formula stops there. So by doing <30 and then <0 you're never going to see the <0 part as anything <0 is also <30 which is checked first.

    So in the cell where you want the status words, use a formula like:

    IF([Calculation of Receivd to Warehouse]@row >= 31, "Delayed", IF([Calculation of Receivd to Warehouse]@row <= 0, "To Warehouse next 30Days", IF([Calculation of Receivd to Warehouse]@row <= 30, "Expected next 30 Days")))

    Then in the color cell use a formula like:

    IF([Calculation of Receivd to Warehouse]@row >= 31, "Red", IF([Calculation of Receivd to Warehouse]@row <= 0, "Green", IF([Calculation of Receivd to Warehouse]@row <= 30, "Yellow")))

    BRIAN RICHARDSON | PMO TOOLS AND RESOURCES | HE|HIM

    SEATTLE WA, USA

    IRON MOUNTAIN

Answers

  • Brian_Richardson
    Brian_Richardson Overachievers
    Options

    @Shubha #INCORRECT ARGUMENT SET means you have one too many arguments in a function. In other words, one of your IF statements has too many options in it. It's the "Expected next 30 Days", "Green", that's messing you up.

    IF takes three arguments IF (test, result if true, result if false). When nesting IF statements usually it's in the "result if false" part. Your second IF statement instead has IF(test, result if true, result if false, another IF). You need to move the "Green" part to another IF statement.

    BRIAN RICHARDSON | PMO TOOLS AND RESOURCES | HE|HIM

    SEATTLE WA, USA

    IRON MOUNTAIN

  • Shubha
    Shubha ✭✭
    Options

    Hi @Brian_Richardson.

    I tried using your instructions & now getting #UNPARSEABLE error. Not able to fix this one, if you could help me in it, that would be really helpful.


    IF([Calculation of Receivd to Warehouse]@row >= 31, "Delayed", IF([Calculation of Receivd to Warehouse]@row <= 30, "Expected next 30 Days", "Yellow" IF([Calculation of Receivd to Warehouse]@row <= 0, "To Warehouse next 30Days" ,"Green")))

  • Brian_Richardson
    Brian_Richardson Overachievers
    Answer ✓
    Options

    @Shubha couple of things going on... you're missing a , after "Yellow", but also you still have too many arguments in the function. IF works with criteria,true result,false result. You have criteria, true result,false result,something else.

    It also looks to me like you're trying to set "Expected next 30 Days" or "To Warehouse" etc in one cell, and a color status "Red", "Yellow" etc in a different cell? You cannot do that with a single formula. You need a formula in each column that you're trying to set.

    Also nested IF statements check conditions in the order that you list them, and when they are true then the whole formula stops there. So by doing <30 and then <0 you're never going to see the <0 part as anything <0 is also <30 which is checked first.

    So in the cell where you want the status words, use a formula like:

    IF([Calculation of Receivd to Warehouse]@row >= 31, "Delayed", IF([Calculation of Receivd to Warehouse]@row <= 0, "To Warehouse next 30Days", IF([Calculation of Receivd to Warehouse]@row <= 30, "Expected next 30 Days")))

    Then in the color cell use a formula like:

    IF([Calculation of Receivd to Warehouse]@row >= 31, "Red", IF([Calculation of Receivd to Warehouse]@row <= 0, "Green", IF([Calculation of Receivd to Warehouse]@row <= 30, "Yellow")))

    BRIAN RICHARDSON | PMO TOOLS AND RESOURCES | HE|HIM

    SEATTLE WA, USA

    IRON MOUNTAIN

  • Shubha
    Shubha ✭✭
    Options
  • WinaHath
    WinaHath ✭✭✭✭
    Options

    getting the same error message on this formula:


    =INDEX(COLLECT({Approved By}, {Department Code}, [Department Code]@row, {Approval Sequence}, 1, 0))


    Please help!

  • Brian_Richardson
    Brian_Richardson Overachievers
    Options

    Hi @WinaHath you have the same problem as Shubha did. You have too many arguments in your Collect statement. That's what that error means. Are you trying to find the first match for the Department Code in another sheet, where Approval Sequence=1?

    If so, then don't use ,0 anywhere. I'm going to assume you want the first match in the Collect, so try

    =INDEX(COLLECT({Approved By}, {Department Code}, [Department Code]@row, {Approval Sequence}, 1),1)

    BRIAN RICHARDSON | PMO TOOLS AND RESOURCES | HE|HIM

    SEATTLE WA, USA

    IRON MOUNTAIN

  • WinaHath
    WinaHath ✭✭✭✭
    Options

    @Brian_ColumbiaSPS

    Thank you! I will try that!

  • Mark King
    Options

    I'm having this issue as well - getting incorrect argument set - but can't find the issue:


    =SUMIFS({NON_STOCK_AGING_DOLLARS_HISTORY Range 5}, {NON_STOCK_AGING_DOLLARS_HISTORY Range 2}, WHS@row, {NON_STOCK_AGING_DOLLARS_HISTORY Range 3}, [Month2]@row)


    If I just do =SUMIFS({NON_STOCK_AGING_DOLLARS_HISTORY Range 5}, {NON_STOCK_AGING_DOLLARS_HISTORY Range 2}, WHS@row) it works. but adding a second criteria argument and it falls apart.

  • Brian_Richardson
    Brian_Richardson Overachievers
    Options

    @Mark King that looks ok to me so the problem is probably in your ranges. They have to be exactly the same set of rows from the same sheet, just different columns. Otherwise it’s impossible for SUMIFS to apply both criteria if the ranges vary.

    BRIAN RICHARDSON | PMO TOOLS AND RESOURCES | HE|HIM

    SEATTLE WA, USA

    IRON MOUNTAIN

  • KParker87
    KParker87
    edited 04/23/24
    Options

    @Brian_Richardson I am also having trouble. I am making a helper column that will identify cells that A) are not blank and B) are more than a year in the past.

    =IF(AND(NOT(ISBLANK([First Date of Suspension for 2023-2024]1)), [First Date of Suspension for 2023-2024]1 < TODAY(-365), "1", "0"))

    Bonus points if you know how to attribute this formula to a checkbox column type rather than just having 1's and 0's as a result.

  • Brian_Richardson
    Brian_Richardson Overachievers
    Options

    It looks like your just missing a closing parenthesis for the AND…you had it at the end of the if statement by accident.

    For checkbox use true and false. You don’t have to declare “else 0” in your if because checkboxes default to false.

    =IF(AND(NOT(ISBLANK([First Date of Suspension for 2023-2024]1)), [First Date of Suspension for 2023-2024]1 < TODAY(-365)), true)

    BRIAN RICHARDSON | PMO TOOLS AND RESOURCES | HE|HIM

    SEATTLE WA, USA

    IRON MOUNTAIN

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!