Calculating the number of days between two date cells returning an extra day

RNelson
RNelson ✭✭✭✭
edited 12/09/19 in Smartsheet Basics

I am trying to calculate the number of days between two date cells and I am using the following formula. I put the -1 day at the end so that if the dates are the same it will count as "0" days instead of "1" day. However, if the end date is before the completion date it changes the formula to "+1" instead of "-1" day. Any idea how to prevent this from happening?

=IFERROR(NETDAYS([Date Completed]2, [Need By Date]2) - 1, "")

Comments