Expired Date code

Gsanchez
Gsanchez
edited 12/09/19 in Formulas and Functions

So i recently create a  new Cell called " Expired Date"  what I'm trying to do in this cell is to show when a date has been expired , based on the Promised Date, but i found that if i left mi code just like this, But 

=IF([Promised Date]4 > TODAY(0), "Expired date", "-" i don't have a restriction. 

And i try this code, but i cant figure out how make it run. 

=IF([Promised Date]4 > TODAY(0), "Expired date", "-", IF(NOT(ISBLANK([Completion Date]4)), "Completed", "-"))

 

Does any one has any suggestions? 

 

Hope everyone has a great day

Comments

  • Mike Wilday
    Mike Wilday ✭✭✭✭✭✭

    Try this: 

    =IF([Promised Date]@row< TODAY(), "Expired Date", IF(NOT(ISBLANK([Completion Date]@row)), "Completed", "-"))

    I think you want Less than today() to highlight dates that are in the past. Also, you need to make sure that you close all opened statements like NOT and ISBLANK before you move on in the IF statements. This revision closes those up for you. I also added @row instead of the row number so you can paste it wherever you want. 

  • Paul Newcome
    Paul Newcome ✭✭✭✭✭✭

    Without knowing your exact setup I cannot be sure, but I would suggest putting the Completed IF before the Expired IF. That way you won't show expired on tasks that are completed.

     

    =IF(NOT(ISBLANK([Completion Date]@row)), "Completed", IF([Promised Date]@row< TODAY(), "Expired Date", "-"))

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!