Calculate Working Days with blank field
Hi there,
I'm trying to calculate the number of working days on a sheet between 2 date columns ("Date Opened" and "Candidate Start Date"). However, if the "Candidate Start Date" column is blank, I want to calculate the number of working days between Today and "Date Opened".
I was hoping someone could just check my logic and make sure I have this formula correct:
=IF([Candidate Start Date]@row = "", NETWORKDAY([Date Opened]@row, TODAY()), NETWORKDAY([Date Opened]@row, [Candidate Start Date]@row))
Thank you!
Best Answer
-
Your formula looks almost correct! However, to handle the case when "Candidate Start Date" is blank, you need to use TODAY() instead of [Candidate Start Date]@row in the second parameter of the IF function. Here's the corrected formula:
excelCopy code=IF(ISBLANK([Candidate Start Date]@row), NETWORKDAYS([Date Opened]@row, TODAY()), NETWORKDAYS([Date Opened]@row, [Candidate Start Date]@row))
This formula will calculate the number of working days between "Date Opened" and "Candidate Start Date" if "Candidate Start Date" is not blank. If "Candidate Start Date" is blank, it will calculate the number of working days between "Date Opened" and today.
Hope this helps!
Answers
-
Your formula looks almost correct! However, to handle the case when "Candidate Start Date" is blank, you need to use TODAY() instead of [Candidate Start Date]@row in the second parameter of the IF function. Here's the corrected formula:
excelCopy code=IF(ISBLANK([Candidate Start Date]@row), NETWORKDAYS([Date Opened]@row, TODAY()), NETWORKDAYS([Date Opened]@row, [Candidate Start Date]@row))
This formula will calculate the number of working days between "Date Opened" and "Candidate Start Date" if "Candidate Start Date" is not blank. If "Candidate Start Date" is blank, it will calculate the number of working days between "Date Opened" and today.
Hope this helps!
-
Thank you @rhj09!! I actually typed the wrong column in my original post (*face palm*), but very glad I got everything correct. Thank you!!
-
Glad to know that it was helpful. Cheers! @Jaime Ciabattoni
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.2K Get Help
- 419 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 141 Just for fun
- 58 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 299 Events
- 38 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!