414ventures
414ventures

Reputation: 11

Need Google Sheets formula for Number of Days with AND without end dates

I need a google sheet formula to calculate number of days on the market with my start date but my secondary cell data either has a end date assigned (no issue there) and others with no date (meaning this should default to current date). The issue I have is sheets doesn't recognize cells without an end date and I would like Sheets to recognize no cell data as current date so I get the number of current days until I enter a true end date. Please advise how to configure a simple date formula rule if possible.

I've tried =C1-D1 formula where C1 is start date and D1 is end date. This works fine for cells with end dates entered. The formula however doesn't work if I have yet to apply an end date (empty cell) and would like Sheets to recognize this empty cell as current date. In other words 0 = current date

Upvotes: 1

Views: 532

Answers (1)

Martín
Martín

Reputation: 10217

Something like this?

=IF(D1="",TODAY(),D1)-C1

Upvotes: 0

Related Questions