+ Reply to Thread
Results 1 to 10 of 10

Split of data into seperate rows using a date range

  1. #1
    Registered User
    Join Date
    06-10-2014
    Posts
    7

    Split of data into seperate rows using a date range

    Hi,

    I have a tricky problem (at least for me) involving a long list that summarize data for a date range in one row per person. I need to split the one row into individual rows based on the date range.

    Every entry contains basic data of a person that should stay the same for every row. In the example file there are 3 columns that contains the following; total hours, number of days and a starting date.

    I need to split the hours (column I) evenly on as many rows as it says in (column J) and I need to add individual dates for each row starting from the start date in (column O). I hope my explanation make sense. I apologize for any grammar mistakes.

    I believe it should be possible but I'm not skilled enough to solve it. Any help would be much appreciated.

    Best regards
    Anders
    Attached Files Attached Files
    Last edited by ploppmongo; 06-12-2014 at 07:59 AM.

  2. #2
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: Split of data into seperate rows using a date range

    Try this code to see if this works as per your requirement.
    Please Login or Register  to view this content.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  3. #3
    Registered User
    Join Date
    06-10-2014
    Posts
    7

    Re: Split of data into seperate rows using a date range

    This is a great start as everything is splitted up just like I wanted!! The only issue and it might be that I didn't explain it correct.

    In the N column I need to have the dates with the start date in the first row and then the next date for every other row.
    E.g.
    Start date 20110101 with number of days 2 would be
    First row 20110101
    Second row 20110102

    Maybe this is an easy fix? Or could it be regional settings that could be the problem?
    Big thanks for the help so far!!!

  4. #4
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Split of data into seperate rows using a date range

    hi ploppmongo, option, press "Run" button or run code "test"
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    06-10-2014
    Posts
    7

    Re: Split of data into seperate rows using a date range

    This solves my problem! Thank you both!!
    BR Anders

  6. #6
    Registered User
    Join Date
    06-10-2014
    Posts
    7

    Red face Re: Split of data into seperate rows using a date range

    Hi again,

    It looks like I was a bit to fast with my cheers for a problem solved.

    I need data from additional columns after the O column. Where in the code can I adjust this?
    The information should be as is but on every row just like the others.

    Thanks for all help!

    BR Anders
    Last edited by ploppmongo; 06-11-2014 at 06:43 AM.

  7. #7
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Split of data into seperate rows using a date range

    hi ploppmongo,

    It's not fair to say it is not solved as it was solved under the set task requirements.

    Please post a sample workbook to support your updated request please

  8. #8
    Registered User
    Join Date
    06-10-2014
    Posts
    7

    Re: Split of data into seperate rows using a date range

    Hi Watersev,

    Truly sorry for that! It was for sure solved under the set task requirements.
    Didn't know how to adress the additional problem I faced.

    Here is an updated example file where more columns has been added to show input and needed output.

    Thanks!!

    BR Anders
    Attached Files Attached Files

  9. #9
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Split of data into seperate rows using a date range

    please check attachment
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    06-10-2014
    Posts
    7

    Re: Split of data into seperate rows using a date range

    Hi Watersev,

    Working like a charm. Additional problem now also solved.
    Thanks a million!!

    BR Anders

+ 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. Split date period into seperate dates
    By Sivran in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-22-2013, 06:26 AM
  2. Split text into new rows on a seperate sheet
    By Mrqaman in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-25-2013, 11:53 PM
  3. [SOLVED] Split a date range in a row into individual rows
    By Vicko in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 12-04-2012, 05:51 AM
  4. Inserting blank rows to seperate data by Date
    By Bytor47 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-17-2011, 02:11 PM
  5. [SOLVED] Split Cell Into Seperate Rows
    By Andibevan in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-21-2005, 02:20 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