date range calculations



G'day, all. I'm needing some help with calculating time between two date/time entries only if another cell in that row is filled, if not, leave blank. Date entry minus Date exit if RESULT column is filled, otherwise leave blank. Thank you

4 Replies


Assuming that the duration will never be more than 31 days:


Format as dd:hh:mm:ss

Thank you, What if the duration is longer than 31 days? is there a formula that will cover both scenarios?
best response confirmed by Sergei Baklan (MVP)


The formula would have to return a text result:



excellent, thank you