Solved

Excel Formula for adding Timecode

Posted on 2011-02-24
4
601 Views
Last Modified: 2012-06-27
Hi,
I need to add video timecodes.  I have a list of inpoints and corresponding durations, and I am trying to calculate the corresponding endpoints.
For example:

COL A             COL B             COL C
START            DURATION     END (This is the column to generate)
00:00:57:12      00:00:03:04      1:01:16
00:01:45:12      00:00:01:13      1:46:25

I found the following formula which would go in cell C3:
=TEXT(LEFT(B3,8)+LEFT(A3,8)+(RIGHT(A3,2)>RIGHT(B3,2))/86401,"m:ss")&TEXT(MOD(RIGHT(B3,2)+RIGHT(A3,2),30),"\:00")
However, it's not always right.  For example, the 'END'  1:01:16 above should really be 1:00:16.
The second one is correct.

Thanks so much for any help!

Evan
0
Comment
Question by:EBrenner
  • 2
  • 2
4 Comments
 
LVL 50

Expert Comment

by:barry houdini
ID: 34974160
Are these hours, minutes, seconds and frames with 30 frames per  second?

barry
0
 

Author Comment

by:EBrenner
ID: 34974210
Sorry, they are:

HH:MM:SS:FF  (Where FF is frames)

Rate is 30 frames per second.  Under column C in my example, I left out HH:M but it won't let me edit now.
0
 
LVL 50

Accepted Solution

by:
barry houdini earned 500 total points
ID: 34974335
Try this version for C3 copied down following that method to give you a text value

=TEXT(LEFT(A3,8)+LEFT(B3,8)+(RIGHT(A3,2)+RIGHT(B3,2)>=30)/86400,"m:ss:")&TEXT(MOD(RIGHT(A3,2)+RIGHT(B3,2),30),"00")

or a shorter alternative which is actually a time value...(which excel views as h:mm:ss but you can treat as m:ss:ff)

=RIGHT(A3,8)+RIGHT(B3,8)+(SECOND(RIGHT(A3,8)+RIGHT(B3,8))>=30)/2880

you could easily convert the latter to text, too by wrapping in a TEXT function

see attached for both

regards, barry
26846078.xls
0
 

Author Closing Comment

by:EBrenner
ID: 34974391
Amazing!  Thanks Barry!
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will show you how to use shortcut menus in the Access run-time environment.
Recently Microsoft released a brand new function called CONCAT. It's supposed to replace its predecessor CONCATENATE. But how does it work? And what's new? In this article, we take a closer look at all of this - we even included an exercise file for…
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question