Formulas and Functions

Formulas and Functions

Ask for help with your formula and find examples of how others use formulas and functions to solve a similar problem.

RYG Status column, IF/AND/OR formula help

Employee
edited 12/09/19 in Formulas and Functions

Hello Community,

I'm trying to establish an RYG Status column formula in my sheet based on values in three other columns. One is a STATUS column with drop-down selections of Completed, Not Started, In Progress. The other two are date columns START DATE, FINISH DATE. 

Here's the statements without proper syntax: 

IF(STATUS)= Completed, Green

IF(STATUS)= BLANK AND (START DATE)>TODAY, BLANK(no symbol)

IF(STATUS)= NOT STARTED AND (START DATE) <TODAY, OR IF(STATUS) = IN PROGRESS AND (FINISH DATE) <TODAY, RED

IF(STATUS) = IN PROGRESS AND (START DATE) < TODAY AND (FINISH DATE) > TODAY, YELLOW

Putting all these in one statement has me baffled.  I've tried this but am getting #UNPARSEABLE error

=IF(AND(STATUS@row = "Not Started", ([START DATE]@row < TODAY()), OR(STATUS@row = "In Progress", ([FINISH DATE]@row > TODAY())), "Red"), IF(AND([STATUS]@row = "In Progress", OR([START DATE]@row < TODAY(), [FINISH DATE]@row > TODAY())), "Yellow"), IF(ISBLANK([STATUS]@row), ""), IF([STATUS]@row = "Completed", "Green"))))

I feel like my order of operations is incorrect as is something in the syntax. 

Any help would be greatly appreciated.  

Thanks

Eric

 

 

Tags:

Comments

  • Community Champion
    edited 01/31/19

    Hi Eric,

    Try this.

    I removed the Blank part because I don't think you need it. 

    IF(STATUS)= BLANK AND (START DATE)>TODAY, BLANK(no symbol)

    The below formula could probably be even more simplified.

    =IF(STATUS@row = "Completed"; "Green"; IF(AND(STATUS@row = "In Progress"; [Start Date]@row < TODAY(); [Finish Date]@row > TODAY()); "Yellow"; IF(OR(AND(STATUS@row = "Not Started"); AND([Start Date]@row < TODAY(); OR(AND(STATUS@row = "In Progress"; [Finish Date]@row < TODAY())))); "Red")))    

    The same version but with the below changes for your and others convenience.  

    =IF(STATUS@row = "Completed", "Green", IF(AND(STATUS@row = "In Progress", [Start Date]@row < TODAY(), [Finish Date]@row > TODAY()), "Yellow", IF(OR(AND(STATUS@row = "Not Started"), AND([Start Date]@row < TODAY(), OR(AND(STATUS@row = "In Progress", [Finish Date]@row < TODAY())))), "Red")))

    Depending on your country you’ll need to exchange the comma to a period and the semi-colon to a comma.

    Did it work?

    Have a fantastic day!

    Best,

    Andrée Starå

    Workflow Consultant @ Get Done Consulting

    SMARTSHEET EXPERT CONSULTANT & PARTNER

    Andrée Starå | Workflow Consultant / CEO @ WORK BOLD

    W: www.workbold.com | E:andree@workbold.com | P: +46 (0) - 72 - 510 99 35

    Feel free to contact me for help with Smartsheet, integrations, general workflow advice, or anything else.

  • Employee

    Hello Andrée,

    YES! Works fantastic. I see now the proper order of operations and syntax and the omission of ISBLANK makes perfect sense. I can't thank you enough.

    Have a wonderful day!

    Regards,

    Eric 

    RYG_1.png

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!

Trending in Formulas and Functions

  • I need a formula to calculate sets of specific Date columns, and tally those date columns into a % of that set? For e.g. I have 2 groups. Each group has specific columns that make up the set for each …
    User: "Not so formula savvy"
    Answered ✓
    72
    16
  • How do I edit this formula to turn button yellow when due date is 5 days away. =IF([% Complete]@row = 1, "Green", IF([End Date]@row < TODAY(), "Red", IF([End Date]@row = TODAY(), "Yellow", "Green"))) …
    User: "hicksiechick"
    Answered ✓
    25
    2
  • Hi, in the image below I have in my "extrusion" column an entry that populates by a formula (in this case "M3406 HEAD TRACK 15' is populating) I'm looking to populate the "Last Cycle Count Date" colum…
    User: "Brandon Morales"
    Answered ✓
    16
    3