+ Reply to Thread
Results 1 to 4 of 4

Converting 4 digit number to time unit and extrapolating time to run from there

  1. #1
    Registered User
    Join Date
    04-12-2011
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2007
    Posts
    18

    Converting 4 digit number to time unit and extrapolating time to run from there

    Hello all

    Part One
    I am trying to find a way to create a macro that will convert the numbers in column B, on the Master worksheet, of the attached file from a number to its time. For example I would like the number 1224 in B1 to be 12:24.

    Part Two
    Once the above conversion is done I then need to get the difference between the times shown going down the column. What I mean is that B1 is the start of a test and B2 is the start of a new test, and B3 is a start of the third consecutive test and so on. I will be sorting these by test type and will need to determine the test run length based on the start of a test and the start of the test after it. As you will note some of the test actually have a TimeTo Run feature and these tests are fine. I will be adding new tests that do not have this TTR variable and thus need to extrapolate the Test Run from start times of the test in question and the test that follows it.

    For example if the test 1 began at 12:25 and the test 2 began at 17:05 then I want to know that the test run took 4 hours and 40 minutes.

    Thanks
    Shaun
    Attached Files Attached Files

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Converting 4 digit number to time unit and extrapolating time to run from there

    How about just inserting a column after col B, and then inserting a formula in C3 and copy down?

    =A3 + DOLLARDE(B3/100, 60)/24
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    04-12-2011
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: Converting 4 digit number to time unit and extrapolating time to run from there

    shg,
    Thanks for the idea and it seems to be workable, however, the only issue with inserting is that I pull data from other columns automatically with other macros I am building and this would necessitate the recreation of the macros. I was hoping to find a macro that could run on the column as it is now and do the conversion to time in-situ. Once done another macro could be run either manually or automatically that would give me the time of a test run between the two start times of two different tests.
    Shaun

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Converting 4 digit number to time unit and extrapolating time to run from there

    One way:
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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