Workday formula doesn't calculate correctly when value is "0"

Options
pbartlett117
pbartlett117 ✭✭
edited 08/15/24 in Formulas and Functions

Hello All,

Having difficulty getting my formula to work properly when a column's value is "0". If the value is >0 it works fine. The formula is supposed to follow the WORKDAY variable and exclude weekends, which it does unless the value in the [Days to add] column is 0 at which point it seems to ignore the workday rule. Any thoughts on how to fix this?

The column in question in this example is the [Trim/Process] in the second row where the date should be the 15th instead of the 13th.

The formula I have is:

=IF([Histology Requested]@row = 0, "NA", IF(OR([Decal Start]@row = "NA", ISERROR([Decal Start]@row)), WORKDAY(Fixation@row, [Days to add]@row, {KAN Holidays Range 1}) + 1, WORKDAY([Decal Start]@row, [Days to add]@row, {KAN Holidays Range 1})))

If it helps: To summarize this sheet, everything builds off [Last NX]. The [Days to add] tells how many days are added to the [Decal End] column which populates from [Fixation] and then each column after that should advance one day after the next.

image.png image.png
Tags:

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!