Share via

Rounding Time Codes in Excel

Anonymous
2021-02-06T00:31:02+00:00

Hi everyone, 

I'm looking for a way to round time codes in excel. I have a list of time codes in hh:mm:ss:ff format where every 24 frames = 1 second. 

For example, 00:00:24:12 would = 24 and 00:00:24:13 = 25.  Just like 00:00:08:02 would = 8 or 00:00:10:23 would = 11

I have about 50 times codes that I need to round to the nearest second and as new codes come in it gets very time consuming. 

I'm absolutely not proficient in excel so if anybody knows of a formula I could use that can round frame rates to the nearest second, that would be an absolute lifesaver. 

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

3 additional answers

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  2. Anonymous
    2021-02-06T01:33:16+00:00

    Hi Joe, 

    Basically we're working off 24 frames per second. So 12 frames and under would round down to the nearest second and 13 frames and over would round up. This works all the up to 00:00:59:(13-23) which would then become 00:01:00:00. However we don't really have durations that long. 

    So in a situation like 00:00:25:12, it would become 25, likewise, if it was 00:00:25:13, it would round up to 26. 

    I'm sorry, but I'm very slow at this and am unsure of how to input in the IF(A2="","",...) part. 

    If it's not too much trouble to explain the structure of the formula, I might be able to understand better so I don't become too annoying.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2021-02-06T00:52:26+00:00

    Unfortunately, you do not have an example like 00:00:25:12.  Is that rounded up to 26 ("round half to even", since 00:00:24:12 is rounded down to 24), or is it rounded down to 25 (always "round half down")?

    If we can assume that your data is always 11 characters (as your examples are), enter the following into B2 and copy down:

    =IF(A2="", "", ROUND(TIMEVALUE(LEFT(A2,8))*86400, 0) + (RIGHT(A2,2)>"12"))

    if we always "round half down".

    For "round half to even":

    =IF(A2="", "", ROUND(TIMEVALUE(LEFT(A2,8))*86400, 0) + (RIGHT(A2,2)>"12") + AND(ISODD(MID(A2,7,2)), RIGHT(A2,2)="12"))

    [EDIT:  I added IF(A2="","",...) so that you can fill column B with conversion formulas, and allow for more or less data "as new codes come in".  Fill enough rows to accommodate the most amount of data you can reasonably expect.  I presume it is less than 1+ million rows. (wink)]

    Was this answer helpful?

    0 comments No comments