Help for Formula to Remove #INVALID Data Type for Blank Fields
Hello Smartsheet Community,
I am currently working on a Smartsheet formula to calculate a date that is 6 months out from a given date in the "Date of OK to Release (system-generated)" column. The formula is working as expected when there is a date present in the column, but I'm encountering the #INVALID DATA TYPE error when the field is blank.
Here is the formula I'm using:
=IFERROR(DATE(YEAR([Date of OK to Release (system-generated)]@row), MONTH([Date of OK to Release (system-generated)]@row) + 6, DAY([Date of OK to Release (system-generated)]@row)), DATE(YEAR([Date of OK to Release (system-generated)]@row) + 1, MONTH([Date of OK to Release (system-generated)]@row) - 6, DAY([Date of OK to Release (system-generated)]@row)))
I would greatly appreciate any insights or suggestions on how to modify this formula to handle blank fields and remove the #INVALID DATA TYPE error. Your expertise will be invaluable!
Thank you in advance for your assistance.
Best Answer
-
Hello @Deanna Ettinger
Please try this:
=IF(ISBLANK([Date of OK to Release (system-generated)]@row), "", IFERROR(DATE(YEAR([Date of OK to Release (system-generated)]@row), MONTH([Date of OK to Release (system-generated)]@row) + 6, DAY([Date of OK to Release (system-generated)]@row)), DATE(YEAR([Date of OK to Release (system-generated)]@row) + 1, MONTH([Date of OK to Release (system-generated)]@row) - 6, DAY([Date of OK to Release (system-generated)]@row))))
Hope this helps!🙂
che
Answers
-
Hello @Deanna Ettinger
Please try this:
=IF(ISBLANK([Date of OK to Release (system-generated)]@row), "", IFERROR(DATE(YEAR([Date of OK to Release (system-generated)]@row), MONTH([Date of OK to Release (system-generated)]@row) + 6, DAY([Date of OK to Release (system-generated)]@row)), DATE(YEAR([Date of OK to Release (system-generated)]@row) + 1, MONTH([Date of OK to Release (system-generated)]@row) - 6, DAY([Date of OK to Release (system-generated)]@row))))
Hope this helps!🙂
che
-
Works perfect! Thanks so much!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 62.9K Get Help
- 379 Global Discussions
- 212 Industry Talk
- 442 Announcements
- 4.6K Ideas & Feature Requests
- 140 Brandfolder
- 129 Just for fun
- 130 Community Job Board
- 449 Show & Tell
- 30 Member Spotlight
- 1 SmartStories
- 301 Events
- 33 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!