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.

If date is less than, greater than, or blank formula.

✭✭✭✭
edited 07/09/21 in Formulas and Functions

I am creating a formula that will display Completed, Upcoming, or Prerecorded based on the dates in Column 2021 Session Dates. When I use the formula below, any row with no date comes back as Completed even though I have added the IF ISBLANK formula to output Prerecorded. I don't get an error in the field, just not getting the desired output. Any assistance is appreciated.

=IF(TODAY(0) > [2021 Session Date]@row, "Completed", IF(TODAY(0) < [2021 Session Date]@row, "Upcoming", IF(ISBLANK([2021 Session Date]@row), "Prerecorded")))

Best Answer

  • ✭✭✭✭✭✭
    Answer ✓

    Hi @Cristina Ayala

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

    =IFERROR(IF(ISBLANK([2021 Session Date]@row), "Prerecorded", IF(AND(ISDATE([2021 Session Date]@row), TODAY() > [2021 Session Date]@row), "Completed", IF(AND(ISDATE([2021 Session Date]@row), TODAY() < [2021 Session Date]@row), "Upcoming"))), "")

    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

  • ✭✭✭✭✭✭
    Answer ✓

    Hi @Cristina Ayala

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

    =IFERROR(IF(ISBLANK([2021 Session Date]@row), "Prerecorded", IF(AND(ISDATE([2021 Session Date]@row), TODAY() > [2021 Session Date]@row), "Completed", IF(AND(ISDATE([2021 Session Date]@row), TODAY() < [2021 Session Date]@row), "Upcoming"))), "")

    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"

  • ✭✭✭✭

    This worked! Thank you so much, Bassam! Seems like I need to brush up on IFERROR function.

  • ✭✭✭✭✭✭

    @Cristina Ayala

    Excellent, Have a nice weekend 😀

    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"

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!

Trending in Formulas and Functions