+ Reply to Thread
Results 1 to 5 of 5

Extract time across columns in blocks of 30 minutes

  1. #1
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,318

    Extract time across columns in blocks of 30 minutes

    Hello all,

    Hoping you can help me out with the extract of time across columns in 30 minute increments.

    So in the example, row 2 starts at 23:38 (column c - arrival). The total time to complete the task is 67 minutes (column D - departed).

    Now with the 67 minutes, I would like to spread it out over column P:CN based on the 30 minute increments in falls within.

    Again, with row 2, look at cell CI2:CK2. 22 minutes spent in the first 30 minute block, 30 mins for the next block with 15 mins finishing out the entire time.

    In row 3, total of 33 mins for the elapsed time. 4 mins in the 1:30 hour with the remaining 29 mins in the 2:00 hour.

    The only data that can be messed with is from column M and to the right. Everything from A:L comes from another database system.

    Please let me know if I can clear anything else up.
    Attached Files Attached Files
    HTH
    Regards, Jeff

  2. #2
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2404
    Posts
    13,407

    Re: Extract time across columns in blocks of 30 minutes

    Jeff, I'm confused.

    There are duplicate pairs of times ... Q1:R1 and BM1:BN1 just to cite 2 examples. Each row has the same story. This counts the times twice. I feel confident this isn't what you want. For example row 2 is 67 min but the formula in O2 is going to total 134 min.

    What am I missing?
    Dave

  3. #3
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,318

    Re: Extract time across columns in blocks of 30 minutes

    Hi Dave and thank you for your time,

    You are exactly right, that would double the time and that's not what I want. Now I see I carried the time way too far. I'm trying to cover a 24 hour period in increments of 30 minutes.

    The part I thought would give me trouble would be what I job start before midnight and ends the next day. How can I make sure we also account for that scenario.

    The 24 hour period should only go to BL, but what about the starting before midnight part? Or maybe BK?

  4. #4
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,924

    Re: Extract time across columns in blocks of 30 minutes

    Hi,

    Try this in Q1:

    =P1+TIME(0,30,0)

    in P2:

    =IF(OR(MOD($C2,1)>P$1+1/48,MOD($C2,1)+$D2-$C2<=P$1),"",
    TEXT(MIN(MOD($C2,1)+$D2-$C2,P$1+1/48),"[m]")-TEXT(MAX(P$1,MOD($C2,1)),"[m]"))
    Attached Files Attached Files

  5. #5
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,318

    Re: Extract time across columns in blocks of 30 minutes

    Yes, this looks like it will work perfectly. Thank you so much for your time. I'm going to do some further testing.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Extract milliseconds, seconds and minutes from time difference value (Rounded down)
    By SapphireZulu in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-20-2020, 09:28 AM
  2. [SOLVED] Time difference in hours:minutes:seconds between two columns
    By jfish in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-14-2019, 08:17 AM
  3. Replies: 5
    Last Post: 05-09-2018, 12:30 PM
  4. [SOLVED] Time interval: extract minutes into other intervals
    By jsr1212 in forum Excel General
    Replies: 16
    Last Post: 04-12-2017, 10:39 AM
  5. Extract time in different formats to number of minutes
    By Jaken3 in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 10-14-2015, 05:57 PM
  6. Extract Minutes and Seconds from a time value
    By purdue7997 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-20-2009, 09:28 PM
  7. [SOLVED] Adding Time Values from Separate Hours and Minutes Columns
    By jeepers in forum Tips and Tutorials
    Replies: 2
    Last Post: 08-23-2005, 12:05 PM

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