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
- Customer Resources
- 64.8K Get Help
- 434 Global Discussions
- 138 Industry Talk
- 470 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 65 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!