How Do I tell a cell that if the cell contains a date then subtract from another date, If the cell d

Melissa Shoumlisky
edited 12/09/19 in Smartsheet Basics

I'm stumped.

I've written a formula that says, if my finish date is blank, then take my start date and subtract it from today's date to get the # of days open:

=IF([Finish Date]2 = 0, TODAY() - [Start Date]2)

Works great!

But in the same formula, I'm trying to get it to say, but if the finish date is NOT blank then take the finish date minus the start date to get the number of days the COMPLETED project was open.

=[Finish Date]1 - [Start Date]1

How do I get this all together in one formula that says:

If the finish date field is blank then subtract start date from today's date, but if the finish date field is NOT blank, then subtract the start date from the finish date. 

Thank you in advance.