# Combining two IF functions

Options
✭✭

Hello!

I am trying to make is a formula that says "If there is a complete date then calculate the # of days that that task took from approval to completion. If complete date is blank then calculate how many days has passed since the approval date".

I have two formulas that work independently but I can't figure out how to put them together. I think I need to make this an OR statement but all my iterations don't seem to work. Any advise would be greatly appreciated.

Formula 1:

IF(ISDATE([CEPA/EPA complete date]@row), [CEPA/EPA complete date]@row - [Approval Date]@row

Formula 2:

=IF(ISBLANK([CEPA/EPA complete date]@row), TODAY() - [Approval Date]@row)

Thank you!😀

Tags:

• ✭✭✭✭✭✭
Options

Try this...

=IF([CEPA/EPA complete date]@row <> "", [CEPA/EPA complete date]@row, TODAY()) - [Approval Date]@row

• ✭✭
Options

It worked! Thank you so much.

So I can learn to do this independently next time, how does this work? I think it says if the complete date is something other than blank then use the CEPA/EPA complete date, otherwise use today - approval.

• ✭✭✭✭✭✭
Options

Happy to help. 👍️

And yes. That is exactly what the formula is saying.

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!