+ Reply to Thread
Results 1 to 10 of 10

Split time in new rows with duration

  1. #1
    Registered User
    Join Date
    07-29-2010
    Location
    Multan
    MS-Off Ver
    Excel 2010
    Posts
    38

    Talking Split time in new rows with duration

    I have to times

    1. Start Date with time as 16-04-13 22:12
    2. End Date with time as 18-04-13 09:12

    can anyone guide me as to how split these times into following pattern

    Date From To Duration
    16-Apr-13 22:12 23:00 Peak
    16-Apr-13 23:00 24:00 N.Peak
    17-Apr-13 00:00 11:00 N.Peak
    17-Apr-13 11:00 23:00 Peak
    17-Apr-13 23:00 24:00 N.Peak
    18-Apr-13 00:00 09:00 N.Peak
    18-Apr-13 09:00 09:12 N.Peak


    Duration Criteria is as follows

    N.Peak 00:00 11:00
    Peak 11:00 23:00
    N.Peak 23:00 24:00



    I have attached Excel File
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: Split time in new rows with duration

    Split Time.xlsx

    I think that's what you need.

    =IF(AND(C13>=0.458333333335759,C13<=0.958333333335759),"Peak","Npeak")
    Elegant Simplicity............. Not Always

  3. #3
    Registered User
    Join Date
    07-29-2010
    Location
    Multan
    MS-Off Ver
    Excel 2010
    Posts
    38

    Re: Split time in new rows with duration

    I have just Start Date and End Date as

    from 16-04-13 22:12 to 18-04-13 09:12

    i have to split this duration in Peak N.Peak for each day manualy.

    I would appreciate if someone can guide me as to how do it with macros.
    i am new to macros and dont know much about loops

  4. #4
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: Split time in new rows with duration

    Did you look at the worksheet i attached ?

  5. #5
    Registered User
    Join Date
    07-29-2010
    Location
    Multan
    MS-Off Ver
    Excel 2010
    Posts
    38

    Re: Split time in new rows with duration

    Yes

    I have to write Data from Cell B12 to f19 manually

    i am looking for macro to split dates in cell C4 & C5 in format given in Cell B12 to F19

  6. #6
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: Split time in new rows with duration

    Attach the real data your working from and i'll send you a real solution...

  7. #7
    Registered User
    Join Date
    07-29-2010
    Location
    Multan
    MS-Off Ver
    Excel 2010
    Posts
    38

    Re: Split time in new rows with duration

    Timings R1.xlsx

    File attached

  8. #8
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: Split time in new rows with duration

    Timings R1.xlsx

    See attached file

  9. #9
    Registered User
    Join Date
    07-29-2010
    Location
    Multan
    MS-Off Ver
    Excel 2010
    Posts
    38

    Re: Split time in new rows with duration

    Dear Pl try to understand

    There are three duration in each date

    e.g Let us take case 1

    From 02-03-13 19:15 to 05-03-13 23:55

    First of all you have to split 02-03-13 to Peak and N.Peak duration
    then you have to split 03-03-13 to peak and N.Peak Duration
    then in the same way you have to split 04-03-13 to peak and N.Peak duration
    then finaly split 05-03-13 to peak and N.Peak duration till 23:55

    this would come as

    02-03-13 19:15 to 02-03-13 20:00 Peak
    02-03-13 20:00 to 02-03-13 23:00 Peak
    02-03-13 23:00 to 03-03-13 00:00 N.Peak
    03-03-13 00:00 to 04-03-13 00:00 Sunday
    04-03-13 00:00 to 04-03-13 11:00 N.Peak
    04-03-13 11:00 to 04-03-13 23:00 Peak
    04-03-13 23:00 to 05-03-13 00:00 N.Peak
    05-03-13 00:00 to 05-03-13 11:00 N.Peak
    05-03-13 11:00 to 05-03-13 23:00 Peak
    05-03-13 23:00 to 05-03-13 23:55 N.Peak

  10. #10
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: Split time in new rows with duration

    My apologies - my mistake

+ Reply to 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