If there is no closed date, the ticket is still open.
Becausedates in Excel are just serial numbers, the math is quite simple.
Calculating days open with IF
The core operation of this formula is controlled by theIF function.
If the result is TRUE, the ticket is still open.
As long as the date opened is past, it will be a smaller number.
If the result from ISBLANK is FALSE, the ticket is closed.
Once an issue is closed, the result is always the same and doesn’t change.
In other words, -C5 appears in both arguments.
If the closed date is empty, its value is zero, so the date today will be used.
The TODAY function takes no arguments.
you’ve got the option to format the value returned by TODAY with a datenumber format.
More than one condition can be tested by nesting IF functions.
For example, if A1 contains “apple”, ISBLANK(A1) returns FALSE.