+ Reply to Thread
Results 1 to 4 of 4

Split Start End date into multiple years

  1. #1
    Registered User
    Join Date
    05-14-2010
    Location
    England
    MS-Off Ver
    Excel 365
    Posts
    14

    Split Start End date into multiple years

    Hi All,

    I am looking for a solution/VBA macro that splits start-end date into years.

    So for example:
    Customer Start End
    Customer1 1/01/2012 31/12/2014
    Customer2 1/08/2015 31/07/2017
    Customer3 1/01/2014 30/06/2017


    Should become:

    Customer Start End
    Customer1 1/01/2012 31/12/2012
    Customer1 1/01/2013 31/12/2013
    Customer1 1/01/2014 31/12/2014
    Customer2 1/08/2015 31/12/2015
    Customer2 1/01/2016 31/12/2016
    Customer2 1/01/2017 31/07/2017
    Customer3 1/01/2014 31/12/2014
    Customer3 1/01/2015 31/12/2015
    Customer3 1/01/2016 31/12/2016
    Customer3 1/01/2017 30/06/2017


    I would be very thankful if someone could help me out with my problem.
    Last edited by tos; 05-25-2016 at 04:52 AM.

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,733

    Re: Split Start End date into multiple years

    The attached file shows how you can do this using formulae. It makes use of two helper columns in D and E (coloured blue) to evaluate the number of years needed for each record, and then the cumulative number. Copy the formulae down as far as required.

    Hope this helps.

    Pete
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    05-14-2010
    Location
    England
    MS-Off Ver
    Excel 365
    Posts
    14

    Re: Split Start End date into multiple years

    Hi Pete,

    Thanks a lot for this formulae. However I am also looking if this can be done via VBA, a macro that loops through all the customers, splits the dates in years and inserts necessary rows.
    In reality I have a list of +1000 start end dates that need to be split and looping through it is better as I need to add some more restrictions

  4. #4
    Valued Forum Contributor
    Join Date
    12-22-2015
    Location
    HK
    MS-Off Ver
    2010
    Posts
    532

    Re: Split Start End date into multiple years

    Put your data in A1 then try my code:

    HTML Code: 

+ 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. Replies: 8
    Last Post: 03-25-2014, 07:37 AM
  2. Split the equal amount acoss months based on start and end date
    By Ktahilramani in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-07-2014, 11:18 PM
  3. How to spread annual forecasts by month across fiscal years by variable start date
    By gbolanis in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-21-2013, 11:59 AM
  4. [SOLVED] Counting the number of times a date occurs in multiple start and end date ranges.
    By Grizz in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 03-05-2013, 04:41 PM
  5. Year To Date Filter - Multiple Years
    By andyrow in forum Excel General
    Replies: 4
    Last Post: 01-11-2013, 09:03 AM
  6. [SOLVED] How to determine how many fiscal years are present from start date to end date.
    By terrivega3500 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 08-07-2012, 01:25 PM
  7. [SOLVED] Start Date minus (Years + Months + Days) = ?
    By quartz in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-11-2006, 01:10 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