Stringing IF statements - statements work individually, but not when strung together

Susan Kane
Susan Kane ✭✭✭
edited 07/11/21 in Smartsheet Basics

Hi,

I am hoping that someone can tell me what is going wrong with my formula. I need to set up RYGG lights. Please see below. The individual formulas work fine, but when I string them together, I get the INCORRECT ARGUMENT SET error message.

Here is the formula:

And here are the individual IF statements and explanations:

I have spent hours trying to figure out why this won't work. I've moved the sequences around, retyped everything several times, have combed through the Community posts (and have found similar problems), but nothing is working. Your help would be MUCH appreciated.

Many thanks!

Susan

Best Answer

  • Bassam Khalil
    Bassam Khalil ✭✭✭✭✭✭
    Answer ✓

    Hi @Susan Kane 

    Hope you are fine, please try the following formula an convert it to column format formula:

    =IF(Status@row = "Complete", "Gray", IF(AND(OR(Status@row = "Not started", Status@row = "Planning"), Start@row >= TODAY()), "Green", IF(AND(OR(Status@row = "In Progress", Status@row = "Scheduled"), Finish@row > TODAY(10)), "Green", IF(AND(OR(Status@row = "In Progress", Status@row = "Scheduled"), Finish@row <= TODAY(10)), "Yellow", IF(AND(OR(Status@row = "Not started", Status@row = "Planning"), Start@row < TODAY()), "Red")))))

    the following screenshot shows the result:


    PMP Certified

    bassam.khalil2009@gmail.com

    ☑️ Are you satisfied with my answer to your question? Please help the Community by marking it as an ( Accepted Answer), and I will be grateful for your "Vote Up" or "Insightful"

Answers

  • Bassam Khalil
    Bassam Khalil ✭✭✭✭✭✭
    Answer ✓

    Hi @Susan Kane 

    Hope you are fine, please try the following formula an convert it to column format formula:

    =IF(Status@row = "Complete", "Gray", IF(AND(OR(Status@row = "Not started", Status@row = "Planning"), Start@row >= TODAY()), "Green", IF(AND(OR(Status@row = "In Progress", Status@row = "Scheduled"), Finish@row > TODAY(10)), "Green", IF(AND(OR(Status@row = "In Progress", Status@row = "Scheduled"), Finish@row <= TODAY(10)), "Yellow", IF(AND(OR(Status@row = "Not started", Status@row = "Planning"), Start@row < TODAY()), "Red")))))

    the following screenshot shows the result:


    PMP Certified

    bassam.khalil2009@gmail.com

    ☑️ Are you satisfied with my answer to your question? Please help the Community by marking it as an ( Accepted Answer), and I will be grateful for your "Vote Up" or "Insightful"

  • Susan Kane
    Susan Kane ✭✭✭

    Hi Bassam,


    it works! This is brilliant, thank you so much! I'm now going to study your formula to see where I went wrong. Thank you so much for your help!

    Thanks

    Susan

  • Bassam Khalil
    Bassam Khalil ✭✭✭✭✭✭

    @Susan Kane

    Excellent, i will be happy to help you any time, and I will be grateful for your "Vote Up" or "Insightful"

    PMP Certified

    bassam.khalil2009@gmail.com

    ☑️ Are you satisfied with my answer to your question? Please help the Community by marking it as an ( Accepted Answer), and I will be grateful for your "Vote Up" or "Insightful"

  • Susan Kane
    Susan Kane ✭✭✭

    I've done both! Thanks again, Bassam.

  • Bassam Khalil
    Bassam Khalil ✭✭✭✭✭✭

    Thanks @Susan Kane

    PMP Certified

    bassam.khalil2009@gmail.com

    ☑️ Are you satisfied with my answer to your question? Please help the Community by marking it as an ( Accepted Answer), and I will be grateful for your "Vote Up" or "Insightful"