Add or Subtract a value from a NETDAYS formula

Justin Mauzy
Justin Mauzy ✭✭✭✭✭

Here is the formula that I have. It works fine except it is one day off:


=IFERROR(NETDAYS([Completion Date]@row, [Due Date]@row), "")

It calculates correctly but I need to adjust by one day:

  • If the returned value is equal to or more than 1, I want to subtract 1 (-1)
  • If the returned value is equal to or less than -1, I want to add 1 (+1)

Thanks in advance.

Best Answer

  • Shubham
    Shubham ✭✭✭✭
    Answer βœ“

    Hi Justin

    I hope you are doing well,Β 

    You can use this formula based on your needs.Β 

    =IFERROR(IF(NETDAYS([Completion Date]@row, [Due Date]@row) >= 1, NETDAYS([Completion Date]@row, [Due Date]@row) - 1, IF(NETDAYS([Completion Date]@row, [Due Date]@row) <= -1, NETDAYS([Completion Date]@row, [Due Date]@row) + 1, "")), "")Β 

    I hope this is useful to you, Have a Good Day.Β 

    ThanksΒ Β 

    Shubham Umale, Smartsheet Engineer, Ignatiuz SoftwareΒ 

Answers

  • Shubham
    Shubham ✭✭✭✭
    Answer βœ“

    Hi Justin

    I hope you are doing well,Β 

    You can use this formula based on your needs.Β 

    =IFERROR(IF(NETDAYS([Completion Date]@row, [Due Date]@row) >= 1, NETDAYS([Completion Date]@row, [Due Date]@row) - 1, IF(NETDAYS([Completion Date]@row, [Due Date]@row) <= -1, NETDAYS([Completion Date]@row, [Due Date]@row) + 1, "")), "")Β 

    I hope this is useful to you, Have a Good Day.Β 

    ThanksΒ Β 

    Shubham Umale, Smartsheet Engineer, Ignatiuz SoftwareΒ 

  • Justin Mauzy
    Justin Mauzy ✭✭✭✭✭

    It worked perfectly. Thank you.

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!