Welcome to the Smartsheet Forum Archives


The posts in this forum are no longer monitored for accuracy and their content may no longer be current. If there's a discussion here that interests you and you'd like to find (or create) a more current version, please Visit the Current Forums.

Comparing dates and returning a RYG ball

Deborah R
Deborah R
edited 12/09/19 in Archived 2017 Posts

Can someone tell me what is wrong with this formula:

= IF(TODAY() - ["DUE"2] > 0, "Red", IF(TODAY() - ["Due"2] > -3, "Yellow", "Green"))

I am trying to compare today to a due date and return the appropriate ball.

 

Thank you.

Tags:

Comments

  • J. Craig Williams
    J. Craig Williams ✭✭✭✭✭✭
    edited 03/09/17

    Deborah,

     

    1. Column name references require the square brackets [] around them if the name contains special characters, spaces, or ends in a number.

     

    2. If the actual column name does not contain quotation marks, you should not use them.

    "DUE" is a valid column name if the name really has quotes around them.

    If the name is just Due, then no quotes are needed to reference it.

    Side note: Column names are case-insensitive, so DUE and Due will be changed in your formula after you type it to the correct case to match the real column name.

     

    3. Cell references are ColumnRow like this: Due2 or [Due Date]2 but not [Due2]

     

    I think this may be what you are looking for:

     

    =IF(TODAY() - Due2 > 0, "Red", IF(TODAY() - Due2 > -3, "Yellow", "Green"))

     

    Hope this helps.


    Craig

     

     

     

     

     

  • Craig--

    Thank you. It works like a charm.

    Deborah
This discussion has been closed.