# Counting for a Blank Cell

Options
edited 12/09/19

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!

• ✭✭✭✭✭✭
Options

Hi Lisi,

You need to add an IFERROR function.

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.

• ✭✭✭✭✭✭
Options

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.

• Options

Hi Mike,

Thank you very much that works perfectly!

• ✭✭✭✭✭✭
Options

You're welcome. Glad I could be of assistance.

• ✭✭✭✭✭✭
Options

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, "")

• ✭✭✭✭✭✭
Options

So true Paul! That's a good idea too.

• Options

This is perfect, I was able to answer another question with this also!

THANK YOU PAUL!

• ✭✭✭✭✭✭
Options

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

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!