Closed Thread
Results 1 to 14 of 14

timecode cell formula

  1. #1
    Registered User
    Join Date
    11-19-2008
    Location
    Dallas, Texas
    Posts
    6

    timecode cell formula

    I'm working on a feature film, and part of my deliverables is a spotting list. This is where I have to go through the entire movie and document each line of dialogue. Each line of dialogue has a start timecode and a stop timecode, and a duration. I need some help building a cell formula that will find the difference in the start and stop timecodes.

    Here's the timecode format HH:MM:SS:FF
    HH: Hours
    MM: Minutes
    SS: Seconds
    FF: Frames (24 fps)
    For example, this is a line from my document:
    01:58:04:10, 01:58:05:11, 1:01, "It should have been contained."
    (start timecode), (stop timecode), (duration), (line of dialogue)
    The challenge has been this issue of frames, and dealing with the base of 24.

    Does anyone have any ideas on how I can create a formula that calculate the difference? I need each timecode entry to stay within one cell.

    Any help would be great appreciated!

    Thanks!
    Russ
    Last edited by VBA Noob; 11-23-2008 at 05:45 AM.

  2. #2
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Hi,

    Does this previous post help?

    http://www.excelforum.com/excel-prog...-timecode.html
    oldchippy
    -------------


    Blessed are those who can give without remembering and take without forgetting

    If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

  3. #3
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650
    Hi, Try this UDF:-
    To insert function, Right click Sheet Tab, Select "View Code", From toobar select "Insert", " Module", New Windopw appears,Paste entire code in VB Window.
    To Run enter Function in cell for Time Duration, as:- FF(stop timecode, start timecode)
    NB:- The Start /Stop timecodes includes your FF bit
    Please Login or Register  to view this content.
    Regards Mick

  4. #4
    Registered User
    Join Date
    11-19-2008
    Location
    Dallas, Texas
    Posts
    6
    Thanks Mick.

    I tried using your formula, but I keep getting a "Compile Error: Sub or Function not defined". It highlights the InStrRev function.

    Any ideas on what is causing that?

    Russ

  5. #5
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650
    Hi, Have a look at the attached, see if it helps !.
    Regards Mick
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    11-19-2008
    Location
    Dallas, Texas
    Posts
    6
    Yeah, same error when I open your sheet. Attached is a screenshot.

    It's probably a version thing. I'm using Excel v.X for Mac. I wouldn't think it would be a problem, though.

    Russ
    Attached Images Attached Images

  7. #7
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650
    Hi,I think the Mac is the Problem, I try and think of an alternative.
    Mick

  8. #8
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650
    Hi, If we assume the Time has 8 digits then this would work.
    Seems logical
    Please Login or Register  to view this content.
    Regards Mick

  9. #9
    Registered User
    Join Date
    11-19-2008
    Location
    Dallas, Texas
    Posts
    6
    Mick,

    If I grab the left 8 of 01:58:04:10, then I only get 01:58:04 (with no frames). So, it won't calculate the correct difference.

    For example, if my start timecode is 01:58:04:10 and my ending timecode is 01:58:04:23, the result should be 00:13.

    Or, another example would be:
    st = 01:58:04:23
    Ed = 01:58:05:15
    FFA should be 00:16

    Or, am I missing something?

    Russ

  10. #10
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650
    Hi, Russ
    Try this:- It should now give you the total time Difference includiing the FF Bits to base 24.
    Please Login or Register  to view this content.
    Regards Mick
    Last edited by MickG; 11-22-2008 at 09:28 AM.

  11. #11
    Registered User
    Join Date
    11-19-2008
    Location
    Dallas, Texas
    Posts
    6
    Hey Mick,

    I just ordered the latest version of MS Office (Mac version 2008). I should be here Monday. Once I get it installed, I'll try out the new function and let you know.

    Thanks for all your help.
    Russ

  12. #12
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    You could use this in lieu of InStrRev:
    Please Login or Register  to view this content.
    Entia non sunt multiplicanda sine necessitate

  13. #13
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    Here's a formula approach......

    If start timecode is in A2 and end timecode in B2 you can use this formula in C2

    =TEXT(LEFT(B2,8)-LEFT(A2,8)-(RIGHT(A2,2)>RIGHT(B2,2))/86400,"m:ss")&TEXT(MOD(RIGHT(B2,2)-RIGHT(A2,2),24),"\:00")

  14. #14
    Registered User
    Join Date
    11-19-2008
    Location
    Dallas, Texas
    Posts
    6
    DaddyLongLegs,

    That was perfect! It works like a charm, and there are no macros.

    I changed the output format slightly. I like the result to look like s:ff, or 4:03, so I changed it as such:

    =TEXT(LEFT(E11,8)-LEFT(D11,8)-(RIGHT(D11,2)>RIGHT(E11,2))/86400,"s")&TEXT(MOD(RIGHT(E11,2)-RIGHT(D11,2),24),"\:00")

    Awesome!

    Thanks,
    Russ

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1