Blank Date in Formula
Hi,
Can someone help me with accounting for a blank date? The formula works if I enter a date in the Current Coterm field otherwise it shows Invalid Data Type.
=IF([Initial or Renewal term?]@row = "Initial", IF((DAY([Current Coterm Date]@row, [Actual Billing Date]@row) / 365 * 12) > [Initial Term NLT]@row, DAY([Current Coterm Date]@row, [Actual Billing Date]@row) / 365 * 12, [Initial Term NLT]@row), IF((DAY([Current Coterm Date]@row, [Last Renewal Date]@row) / 365 * 12) > [Renewal Term NLT]@row, (DAY([Current Coterm Date]@row, [Last Renewal Date]@row) / 365 * 12), [Renewal Term NLT]@row))
Answers
-
What would you want it to do if there is no date?
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
-
A good catch-all I use in instances like this are IFERROR() functions. So it would look like:
_________________________________________________________________
=IFERROR(
IF([Initial or Renewal term?]@row = "Initial", IF((DAY([Current Coterm Date]@row, [Actual Billing Date]@row) / 365 * 12) > [Initial Term NLT]@row, DAY([Current Coterm Date]@row, [Actual Billing Date]@row) / 365 * 12, [Initial Term NLT]@row), IF((DAY([Current Coterm Date]@row, [Last Renewal Date]@row) / 365 * 12) > [Renewal Term NLT]@row, (DAY([Current Coterm Date]@row, [Last Renewal Date]@row) / 365 * 12), [Renewal Term NLT]@row))
,"")
_________________________________________________________________
Anything that kicked an error would then be blank or "". :)
-
Hi @Farrah Jensen,
What outcome(s) are you looking for in the event you have a blank date? I would guess you would add some IFERROR statements around your IFs, but exactly how the formula would look would depend on what you want the result to be.
-
I am looking for it to ignore the [Current Coterm Date] if it is blank and calculate with just the Actual Billing Date.
-
Each place that you have this:
DAY([Current Coterm Date]@row, [Actual Billing Date]@row)
would be replaced with this:
DAY(IF([Current Coterm Date]@row <> "", [Current Coterm Date]@row, [Actual Billing Date]@row))
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 62.9K Get Help
- 378 Global Discussions
- 208 Industry Talk
- 441 Announcements
- 4.5K Ideas & Feature Requests
- 139 Brandfolder
- 129 Just for fun
- 130 Community Job Board
- 449 Show & Tell
- 30 Member Spotlight
- 1 SmartStories
- 290 Events
- 33 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!