Need help with Nested If Statement

I need some help with a nested formula. I've spent hours on this and cannot seem to get it to work.
I'm basically looking for the following function: If date column 1 and date column 2 are not blank, then, If these dates (date column 1 and date column 2) are the same, enter 0, if not, return the number of days between the first and the second date, if not, enter "N/A".
Here is one function I've tried:
=IF(AND(NOT(ISBLANK([Initial Project Presentation on]@row, [Tollgate 1 approved on]@row), IF([Initial Project Presentation on]@row = [Tollgate 1 approved on]@row, 0, (NETDAYS([Initial Project Presentation on]@row, [Tollgate 1 approved on]@row))), "N/A")))
Any help would be appreciated.
Thank you!
Best Answer
-
In your AND argument you need to qualify both statements, and I needed to adjust some of the parentheses. Try this.
=IF(AND(NOT(ISBLANK([Initial Project Presentation on]@row)),NOT(ISBLANK([Tollgate 1 approved on]@row))), IF([Initial Project Presentation on]@row = [Tollgate 1 approved on]@row, 0, NETDAYS([Initial Project Presentation on]@row, [Tollgate 1 approved on]@row)), "N/A")
Answers
-
In your AND argument you need to qualify both statements, and I needed to adjust some of the parentheses. Try this.
=IF(AND(NOT(ISBLANK([Initial Project Presentation on]@row)),NOT(ISBLANK([Tollgate 1 approved on]@row))), IF([Initial Project Presentation on]@row = [Tollgate 1 approved on]@row, 0, NETDAYS([Initial Project Presentation on]@row, [Tollgate 1 approved on]@row)), "N/A")
-
Fantastic! That solved it! Thank you so much!
Help Article Resources
Categories
Check out the Formula Handbook template!