Counting for a Blank Cell
Hello!
I have this formula that works great:
=DATE(YEAR([Completion Date]3), (MONTH([Completion Date]3) + 3), (DAY([Completion Date]3)))
But if my date in "[Completion Date]3" is blank it throws off my whole formula. What can I add so it stays blank if I have no date in "[Completion Date]3".
THANK YOU!
Comments
-
Hi Lisi,
You need to add an IFERROR function.
More info: https://help.smartsheet.com/function/iferror
Let me know if you have any questions!
Have a fantastic week!
Best,
Andrée Starå
Workflow Consultant @ Get Done Consulting
SMARTSHEET EXPERT CONSULTANT & PARTNER
Andrée Starå | Workflow Consultant / CEO @ WORK BOLD
W: www.workbold.com | E:andree@workbold.com | P: +46 (0) - 72 - 510 99 35
Feel free to contact me for help with Smartsheet, integrations, general workflow advice, or anything else.
-
To be more specific you can wrap the entire formula in the IFerror function like this...
=IFERROR(DATE(YEAR([Completion Date]3), (MONTH([Completion Date]3) + 3), (DAY([Completion Date]3))),"Insert Date")
This will give you the value of "Insert Date" if there is no date in the Completion Date field. If you want it to be blank, you can Delete the text Insert Date and leave the quotation marks.
-
Hi Mike,
Thank you very much that works perfectly!
-
You're welcome. Glad I could be of assistance.
-
You could also use your current formula in an IF statement to say if the completion date is an actual date, then run your formula, otherwise leave blank.
=IF(ISDATE([Completion Date]3), your formula goes here, "")
-
So true Paul! That's a good idea too.
-
This is perfect, I was able to answer another question with this also!
THANK YOU PAUL!
-
I use this process a lot to build nested IF statements. Sure you could use an AND statement if you have multiple requirements, but a lot of the time I haven't realized the need for it until I have already built the bulk of my formula. In those cases, I'll just wrap it in one more IF function. This also provides the ability to account for things other than errors.
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!