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 Formula

Hello all,

I have a sheet with some conditional formatting that changes the color of the row depending on "Date Expires" date. I would like to add a formula to add RYG as well and was hoping someone could help me with the said formulas. Below is what I would like to accomplish:

  • Red if the date in "Date Expires" is in the past from today (the green rows)
  • Yellow if the date in "Date Expires" is in the next 30 days from today (the brown rows)
  • Green if the date in "Date Expires" is more than 30 days out from today or when none of the other rules apply (the white rows)
  • Grey if "Listing Status" are either Cancelled, Closed, or Expired (the blue, pink and yellow rows)

Hope someone can help me!

Thank you~


Answers

  • ✭✭✭✭✭

    Hi @Saramitsu

    Here is what you're looking for:

    =IF(OR([Listing]@row="Cancelled", [Listing]@row="Closed", [Listing]@row="Expired"), "Grey", IF([Date Expired]@row<TODAY(-30), "Green", IF([Date Expired]@row>TODAY(), "Red", "Yellow")))

    Also, if all of your listing options are "Cancelled", "Expired", "Closed" and "Active", then this one is even better:

    =IF([Listing]@row = "Active", IF([Date Expired]@row<TODAY(-30), "Green", IF([Date Expired]@row>TODAY(), "Red", "Yellow")), "Grey")

    Hope it helped!

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 ✓
    66
    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 ✓
    24
    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 ✓
    14
    3