Google Sheets – Formula to Return Time Difference Without Displaying 0

google sheets

I have a Google Sheets with start (C) and end (D) timestamps. I am calculating the time difference using =(D1-C1). I have copied the formula to empty columns which returns a 0 time difference.

Is there a way to hide the value if it returns 0?

Best Answer

The following formula will do just that:

=IF(D1-C1=0;"";D1-C1)

It says: if the result of D1-C1 equals 0, then show nothing (""), else show the result.