Timecode formula for spreadsheets

Like it or not spreadsheets are just too useful. Having the right formula to hand can really make things easier. Plus for me writing a bit of code serves to alleviate the tedium of data entry.

This expression will calculate the difference between two timecodes and spit out the answer in frames. Each cell must written using 11 characters in the standard timecode format. e.g.    10:23:07:24

This version works at 25 FPS and will subtract the IN point cell ‘G4’ from the OUT point cell ‘H4’.

((MID(H4;1;2)*3600+MID(H4;4;2)*60+MID(H4;7;2))*25+MID(H4;10;2))-((MID(G4;1;2)*3600+MID(G4;4;2)*60+MID(G4;7;2))*25+MID(G4;10;2))

You can change the frame-rate by swapping the 25 for a different number.

How it works

The MID function simply grabs individual characters from a cell.

MID(H4;7;2)

Will grab 2 characters from cell H4 starting with the 7th character in the string.
E.g. It will grab 07 from 10:23:07:24

MID(H4;7;2))*25

07 seconds * 25 fps = 175 frames