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
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 63K Get Help
- 379 Global Discussions
- 212 Industry Talk
- 442 Announcements
- 4.6K Ideas & Feature Requests
- 140 Brandfolder
- 129 Just for fun
- 130 Community Job Board
- 449 Show & Tell
- 30 Member Spotlight
- 1 SmartStories
- 302 Events
- 33 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!