Formula from Excel Help

Hello community, I cannot figure out why this formula is #UNPARSEABLE in Smartsheet when it works perfectly in Excel. The intent is to show the amount of days left before/after "Due Date" [Column5].

EXCEL

=IF(E2="","",IF(E2<TODAY(),-DATEDIF(E2,TODAY(),"d"),DATEDIF(TODAY(),E2,"d")))

SMARTSHEET

=IF([Column5]2="","",IF([Column5]2<TODAY(),-DATEDIF([Column5]2,TODAY(),"d"),DATEDIF(TODAY(),[Column5]2,"d")))

Help please!!!

Tags:

Answers

  • David Joyeuse
    David Joyeuse ✭✭✭✭✭

    Hi @Carlos Gonzalez

    DATEDIF is not a function in smartsheet, so the #UNPARSEABLE is obvious. And you don't really need it. What you need is:


    =IF([Column5]@row="", "", IF([Column5]@row<TODAY(), TODAY() - [Column5]@row, [Column5]@row - TODAY()))

    Now you can also replace DATEDIF with the NETWORKDAYS function if you want to only return the working days out of this.

    =IF([Column5]@row="", "", IF([Column5]@row<TODAY(),NETWORKDAYS([Column5]@row, TODAY()), NETWORDAYS(TODAY(), [Column5]@row)))

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!