#INVALID DATA TYPE

Cathy Fraser
Cathy Fraser ✭✭✭✭✭
edited 12/09/19 in Formulas and Functions

Hi, I am using the following formula that calculates the # of days between a date field and TODAY(). I have an issue if there is no date in the field and giving an #Invalid Data Type error. I would like it to either be blank or if possible to say "Please provide a Date"

Formula

=NETWORKDAYS([Lease Stage Date Changed]1, TODAY())

Thanks for your help in advance

Cathy

 

Capture_2.JPG

Tags:

Comments

  • shdil
    shdil ✭✭

    Hi Cathy,

    This should be able to be solved with an IFERROR formula. 

    IFERROR produces a value (your original formula) as the first option and if it is blank, it will return a second value.  

    Try this formula: 

     =IFERROR(NETWORKDAYS(date2, TODAY()), " ")

    I have put your original formula in bold.  This should solve the problem-- hope it helps!

  • Cathy Fraser
    Cathy Fraser ✭✭✭✭✭

    Thanks Shdil, the formula worked great. 

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!