Calculating Timecode in Excel

Posted: 11 August 2011 by Chris Hocking

Today I was contacted by a filmmaker friend that wanted to work out a way to calculate timecode within an Excel spreadsheet. Fortunately there are some great Macro’s out there that allow you to do just that, however the one I recommended is not terribly well documented, so I thought I would jot down some notes here.

The tool I recommended was Excel Time Code Extension by Matthias Bürcher. It hasn’t been updated since 1997, however it still works great, even on the later versions of Excel. Although there is some great documentation floating around on the Internet (this blog is probably the best resource – especially the comments), when I first downloaded it all I really wanted was a Installation Guide and an Example.

Here’s a crash course for Mac users out there – although the workflow is very similar for PC users. I tested this on MacOS 10.6.8 and Excel 2008.

1. Download the XLA script from here (I hope you don’t mind Matthias, but I’ve also mirrored it here - just in case your site ever goes down).

2. Unzip the download, and then drag the XLA file into Excel.

3. You will be presented with a Macro Warning – just click Open.

4. You will now be left with a blank Excel workbook. To activate the plugin, press Command+Option+T (Windows users can just press Control + T I’m told, although I haven’t tested it personally yet). In the bottom status bar you should see a message like the below to confirm that everything is working properly:

5. You can now start getting to work! Select the fields you want to use as timecode fields, then click Format > Style from the top menu bar.

6. Then select Time Code from the Style Name and click OK.

7. You can now enter timecode into the fields you selected previously. Enter it as a full number, without any spaces (for example 01013000). Excel will automatically format it nicely (i.e. 01:01:30:00).

8. With that complete, you can now start doing some calculations. For the purposes of this demonstration, let’s just add A1 and A2 together. There’s probably a much quicker way to do this, but the most reliable method I’ve found is to convert the timecode values to frames, do the calculations as frames, then convert the frames back to timecode at the end. So, in B1 let’s display the value of A1 as frames (at 25fps). To do this type:

=TCtoframes(A1,25)

9. And do the same for B2:

=TCtoframes(A2,25)

10. Now add B1 and B2 together:

=B1+B2

11. Now let’s use the cell A4 to show our final calculation. The first thing you need to do is change it to a timecode style (as per step five and six above), then you can enter the following calculation:

=framestoTC(B3,25)

12. And assuming everything was typed in correctly – you should now have your finished calculation!

There is a list of all the different functions you can use here, although there’s a more detailed explanation on the French page (which you can use Google Translator or similar to translate).

However, most functions don’t really need much explanation, so here’s a summary of what’s available:

  • TCtoframes(TC,fps)
  • framestoTC(frames,fps)
  • TCplus(TC1,TC2,fps)
  • TCminus(TC1,TC2,fps)
  • TCmult(TC1,facteur,fps)
  • TCdiv(TC1,facteur,fps)
  • TCsum(TCref,fps)
  • TCtrans(TC,fromfps,tofps)
  • TCtofeet(TC,gauge,fps)
  • feettoTC(feet,gauge,fps)
  • TCtometer(TC,gauge,fps)
  • metertoTC(meter,gauge,fps)
  • timetoTC(intime)
  • TCtotime(inTC)
  • texttoTC(intext)
  • TCtotext(inTC,fps)
  • isTC(TC,fps)
Finally, here is an nice and simple example Excel sheet you can download and test for yourself. It’s basically exactly the same as the above example, except laid out a bit nicer. Hope it helps!


6 Responses to "Calculating Timecode in Excel"

I keep getting stuck on TCminus(TC1,TC2,24). It gives me the error

Macro Error
Names cannot look like references
Macro error at cell [TC.XLA]TC source corr1!E2

Im just trying get a duration of a shot subtracting one time code from another. I’ve tried using colons, semi colons, without the FPS and with. All to no avail. Any ideas would be great!

Chris Hocking says: 28 September 2011 at 3:20 pm

I would suggest just converting everything to frames first, doing the calculations, then convert back to FPS at the very end (as per the example I gave).

In your case, just follow the instructions on the blog, but at step 10, change the plus to a minus.

Hope that helps!

Best Regards, Chris!

I’m losing my mind. I’m doing EVERYTHING you have written here – the exact order you have it written, I’m using EXCEL 2008 on OS 10.6 and it WILL NOT work…. It recognizes the functions(they list when I type in an equals sign), I’m pressing Comm Opt T, I see the website at the bottom … NOTHING?!
Am I retarded? I took computer programming in Engineering. I can’t be THAT stupid! What am I missing?

Chris Hocking says: 8 December 2011 at 9:40 pm

We are also using Microsoft Excel 2008 on a Mac running 10.6.8 – so that shouldn’t be an issue.

If you followed the instructions exactly – then it should just work.

Try exiting Excel, then starting again. Make sure at Step 5 that you select ALL the cells you want to be used for timecode values.

Also, try downloading my example. It probably won’t actually work (as for some strange reason Excel won’t import the XLA script properly on sheets you don’t create yourself) – but you can use it to check that the syntax is the same.

Good luck!

Hi thanks for the post it helps explain it a lot better than the website.

A question though… does anyone have a macro or port of this for Mac Pages ? I really do not want to go back to working in excel! Thanks for any updates and answers to my question.

Chris Hocking says: 6 January 2012 at 8:22 pm

Unfortunately I don’t know of any similar solution for Pages. If you find one – please let me know!

Best Regards, Chris!

Leave a comment

required