I keep getting #Incorrect Argument Set I am not sure where my formula is wrong - IF(AND(....

I want a "green" symbol to populate when the Office and month from sheet 1 match Office and Month in sheet 2 and the date completed from sheet 1 is less than or equal to the date due on sheet 2

Below is the formula that is giving me trouble.

=IF(AND({Completed on_CSC} <= [May Due Date]@row, {MODrpt}, Office@row, {RptMonth}, May$1, "Green"))


Thank you for any help

Merit

Answers

  • KPH
    KPH ✭✭✭✭✭✭

    Hi @Merit Sowards

    The incorrect argument set error means there is an issue in your formula syntax, usually a misplaced parenthesis or comma. I think I can see one of each in yours.

    Can you try replacing the commas within your logical expressions with an equals sign. The first is correct, but the second and third are not (suggestion in bold here)

    =IF(AND({Completed on_CSC} <= [May Due Date]@row, {MODrpt}= Office@row, {RptMonth}= May$1, "Green"))

    And then move the closing parenthesis for the AND to be before the value if true for the IF (in bold here)

    =IF(AND({Completed on_CSC}, <= [May Due Date]@row, {MODrpt}, Office@row, {RptMonth}, May$1), "Green")

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!