Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2006
    Posts
    46

    Unanswered: Dealing with Seconds in Excel

    I have an ususual problem in that I have two columns of time and I am trying to get the number of seconds in them. The way that my time format is setup is as follows:
    105236
    105331

    In this example, the difference between the two times is 55 seconds.

    Unfortunately, the raw data for my time is as above and is not in an easy format like 10:52:36 and 10:53:31. If it were, I could use one of two formulas like = (c1 - b1,"s") or = (c1 - b1) * 86400.

    The problem with the data that I have is that I cannot get Excel to read the formatting of the time data that I have. It basically does not understand the values as a time value. Could someone please give me some suggestions on how to deal with my problem.

    The last thing I want to do is to parse through my two columns and do the following:

    10 * 3600 = 36000
    52 * 60 = 3120
    36 * 1 = 36
    --------------
    39156


    10 *3600 = 36000
    53 * 60 = 3180
    31 * 1 = 31
    ----------
    39211

    39211 - 39156 = 55 seconds

  2. #2
    Join Date
    Feb 2006
    Posts
    113
    Shiva,

    Excel works in decimal numbers - you have sexagesimal.

    Suggest you convert, for example using division and INT - or maybe integer division if using VBA. You can combine the elements (hours, minute, seconds) with the TIME worksheet function and do subtraction in the normal manner.

    HTH,
    Fazza

Posting Permissions

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