SOLVED

iferror and today function

Copper Contributor
Hi, I'm trying to use both functional ions to calculate duration in a project tracker. My formula is:
=iferror(cell b-a,today()-cell a)
Reason it's done this way is because i would like a count of the days if there is no completion date and will calculate from today's date minus the start date.
6 Replies

@Lizzy2320 Perhaps something like this:

=IF(ISBLANK(B1),TODAY()-A1,B1-A1)

Using IFERROR makes no sense as there will not be an error. Just a TRUE or a FALSE. This formula will check if B is empty. If so, todays date, minus A, otherwise B minus A. 

Thanks! Isblank won't count accurately if the end date is inputted.

@Lizzy2320 Why not? See attached.

 

If the cells are blank it will return a number.
best response confirmed by allyreckerman (Microsoft)
Solution

@Lizzy2320 Perhaps like this then:

=IF(ISBLANK(A1),"",IF(ISBLANK(B1),TODAY()-A1,B1-A1))

 

Thank you! This did the trick :)
1 best response

Accepted Solutions
best response confirmed by allyreckerman (Microsoft)
Solution

@Lizzy2320 Perhaps like this then:

=IF(ISBLANK(A1),"",IF(ISBLANK(B1),TODAY()-A1,B1-A1))

 

View solution in original post