IF and ISDATE Formula
I want to calculate NETDAYS from Submission Date to Todays Date, or to Comments Log Received Date
I have this formula that works.
=IFERROR(IF([Comments Log Received]@row = "", NETDAYS([Date Submitted to SJTA]@row, TODAY()), NETDAYS([Date Submitted to SJTA]@row, [Comments Log Received]@row)), "")
However, I need to expand the formula to calculate what happens after the Comments Log Received becomes a date. This is what I came up with, but it does not work.
=IFERROR(IF([Comments Log Received]@row = "", NETDAYS([Date Submitted to SJTA]@row, TODAY()), NETDAYS([Date Submitted to SJTA]@row, [Comments Log Received]@row)), IF(ISDATE([Comments Log Received]@row, NETDAYS([Date Submitted to SJTA]@row, [SJTA Approval Date]@row), "")))
What am I doing wrong?
Answers
-
Hello SJTA,
I can tell you are having some trouble with your IF Statements, it turns out the ISDate function is giving you grief.
I am happy to provide a solution. Please try:
=IFERROR(IF([Comments Log Received]@row = "",NETDAYS([Date Submitted to SJTA]@row, TODAY()), NETDAYS([Date Submitted to SJTA]@row, [Comments Log Received]@row)), IF(ISDATE([Comments Log Received]@row), NETDAYS([Date Submitted to SJTA]@row, [SJTA Approval Date]@row), ""))
As if to say:
If No Comments Have Been Received in the Comment Log
Then return the number of days between Submitted to SJTA and today.
Else return the number of days between the date submitted to SJTA and Comments Log Received
If formula returns an error and Comments Log Received contains a date
Then return the number of days between the Date Submitted to SJTA and SJTA Approval Date
If formula returns an error and Comments Log Received does not contain a date
Then return blank.
I have provided an attached link if you would like to know more about how I arrived at your solution. Please follow us on LinkedIn if you need any further assistance!
https://www.linkedin.com/feed/update/urn:li:activity:7111446198875553792
CEO | Skyway Consulting Co.
Does your Dashboard need a map that updates from Smartsheet Data?
We pioneered 101+ ways to add a map to a Smartsheet Dashboard.
Smartsheet and GIS Integrations
→ Explore Smartsheet Maps (ArcGIS)
→ LinkedIn
-
Thanks but, this does not work. The first half of the formula works, however the IF ISDATE does not change the value.
-
I responded more thoroughly on LinkedIn but, this should work!!!
=IFERROR(IF([Comments Log Received]@row = "", NETDAYS([Date Submitted to SJTA]@row, TODAY()), IF([SJTA Approval Date]@row = "", NETDAYS([Date Submitted to SJTA]@row, [Comments Log Received]@row), NETDAYS([Date Submitted to SJTA]@row, [SJTA Approval Date]@row))), "")
CEO | Skyway Consulting Co.
Does your Dashboard need a map that updates from Smartsheet Data?
We pioneered 101+ ways to add a map to a Smartsheet Dashboard.
Smartsheet and GIS Integrations
→ Explore Smartsheet Maps (ArcGIS)
→ LinkedIn
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
- 142 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!