Netdays formula only on rows with a column value
Hello! I'm looking for some help with the Netdays formula. I am trying to create a helper column that tracks the number of days between a date column titled "Start Date" (when a project began) and a date column titled "Completion" (when a project is completed). My current formula, which is just a start, is this:
=NETDAYS([Start Date]@row, Completion@row)
While it yields a correct value for rows with both dates present, it generates following error for those rows without completion date:
#INVALID DATE TYPE
I believe this error is impacting my sheet summary where I am trying to track the average days it is taking my team to complete tasks. Is there a way to run the Netdays formula on the entire column, but only if there is a date value in the "Completion" column?
TIA for your help!
Best Answer
-
You can use an IF function with ISBLANK.
This formula:
=IF(ISBLANK(Completion@row), "", NETDAYS([Start Date]@row, Completion@row))
Says IF Completion@row is blank, return "" (nothing).
If it is not then return the NETDAYS results.
Answers
-
You can use an IF function with ISBLANK.
This formula:
=IF(ISBLANK(Completion@row), "", NETDAYS([Start Date]@row, Completion@row))
Says IF Completion@row is blank, return "" (nothing).
If it is not then return the NETDAYS results.
-
Hi Alexandra Reeder,
You can try the below formula with IFERROR, So, it will not generate an error.
=IFERROR(NETDAYS([Start Date]@row, Completion@row), " ")
Thank you
Anjanesh Vaidya
Thanks,
Anjanesh Vaidya
Smartsheet Development, Ignatiuz Software
Did this answer help you? Show some love by marking this answer as "Insightful💡" or "Awesome❤️" and "Vote Up⬆️
-
@KPH, your formula worked
Thank you, both, for your willingness to help.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 65.2K Get Help
- 445 Global Discussions
- 143 Industry Talk
- 476 Announcements
- 5K Ideas & Feature Requests
- 84 Brandfolder
- 150 Just for fun
- 71 Community Job Board
- 488 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 301 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!