+ Reply to Thread
Results 1 to 5 of 5

Breaking down rows based on hours and days

  1. #1
    Registered User
    Join Date
    03-10-2013
    Location
    Timbuktu
    MS-Off Ver
    Excel 2010
    Posts
    4

    Unhappy Breaking down rows based on hours and days

    Don't know how to display data it in pivot table that doesn't exist in the org source but

    I have data that looks like this:
    #,Day, Date and time, minutes
    1,Tue, 1/1/2012 1:00 am, 60
    2,Wed, 1/2/2012 3:00 am, 120
    3,Wed, 1/2/2012 2:00 pm, 190
    4,Wed, 1/2/2012 5:00 pm, 30


    What I would like to do is take the data and break anything over 60 in multiple rows. So where it says 120, it will create a copy of the row and new row below the original with 60 min and 3:00 am (instead of 2:00 am). The field that has 190 min. It will split the row in to three additional rows below, then at 2:00 pm will have 60 then at 3:00 it will be another 60, then at 4:00 will have 60 and at 5:00 it will have 40.

    So the end result should look like
    #,Day, Date and time, minutes
    1,Tue, 1/1/2012 1:00 am, 60
    2,Wed, 1/2/2012 3:00 am, 60
    2,Wed, 1/2/2012 4:00 am, 60
    3,Wed, 1/2/2012 2:00 pm, 60
    3,Wed, 1/2/2012 2:00 pm, 60
    3,Wed, 1/2/2012 2:00 pm, 60
    3,Wed, 1/2/2012 2:00 pm, 10
    4,Wed, 1/2/2012 5:00 pm, 30


    Can u help me?

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Breaking down rows based on hours and days

    Please attach a sample workbook with expected output for better understanding


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Registered User
    Join Date
    03-10-2013
    Location
    Timbuktu
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Breaking down rows based on hours and days

    OK, see the attached Detail.xlsx

  4. #4
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,710

    Re: Breaking down rows based on hours and days

    Pl see the attached file with macro. Macro adds a worksheet by name "Output" and transfers data from "Detail" Sheet.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    03-10-2013
    Location
    Timbuktu
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Breaking down rows based on hours and days

    Detail ans date iss.xlsm This is awesome! Thank you. There is one issue with it. It is breaking down the minutes, however, if it goes over 00:00 (midnight) it adds -1380 min for some reason. I have attached and highlighted the issue area.

    Can we do something to fix it?

+ 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