How to calculate time duration between two inputs

Copper Contributor

Suppose I write START in B2 and DONE in C2, rather than inputting the start and end time, is there any way to calculate the time interval between the texts I wrote START and DONE?

 

Thanks in advance.

3 Replies

@Mahdia_Akter 

That would require VBA.

An easier alternative would be to select B2 and press Ctrl+Shift+; when you start. This inserts the current time in B2.

Select C2 and press Ctrl+Shift+; when you're done. This inserts the current time in C2.

The formula =IF(OR(B2:C2=""),"",C2-B2) will return the time interval. The disadvantage is that the time is in hours and minutes only, no seconds.

S1330.png

@Mahdia_Akter 

Here is a small alternative with VBA.

A right click workaround.

Go to the cell and right click on the cells.

 

 

thanks but i was looking if not by inputting the time, but by writing start and end, if i can calculate interval between writing those texts