Options
✭✭✭✭✭

I have this formula that is working perfectly, it returns the value in number of days between

1. Date submitted to Todays date OR

However, I want to add another IF calculation to that formula to return the value of number of days between Date submitted and Document Status Date. This is what I thought that would look like, but I keep getting an error message. #INCORRECT ARGUMENT SET

=IFERROR(IF([Comments Log Received]@row = "", NETDAYS([Date Submitted to SJTA]@row, TODAY()), NETDAYS([Date Submitted to SJTA]@row, [Comments Log Received]@row), NETDAYS([Date Submitted to SJTA]@row, [SJTA Document Status Date]@row)), "")

Thanks.

Tags:

• ✭✭✭✭✭✭
Options

How do you designate when to use the Status Date?

• ✭✭✭✭✭
Options

@Paul Newcome I have don't have a designation as to when to use any of the dates. Currently the formula works whenever the particular date is entered. I assumed that the formula works in the order of the arguments.

• ✭✭✭✭✭✭
Options

So you do have a designation technically in that once the first date is entered, you are using it.

If you just want it to work in order, you will need to use a nested IF.

• ✭✭✭✭✭
Options

What should the formula look like with a nested IF?

Thanks,

Camille

• ✭✭✭✭✭✭
Options

If we isolate the IF statement and look at the proper syntax:

=IF(logical statement, value if true, value if false)

And then compare it to your existing formula:

=IF(logical statement, value if true, value if false, another output)

A nested IF statement takes a second (or however many you need but you only need one extra in this case) IF and drops it into the third portion of the first IF (value if false).

=IF(logical statement, value if true, IF(logical statement, value if true, value if false))

Basically it says that if the first is false, then we want to run this other IF statement.

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!