+ Reply to Thread
Results 1 to 3 of 3

VBA/Macro Add new rows with format based on year grouping

  1. #1
    Registered User
    Join Date
    12-10-2019
    Location
    Colorado
    MS-Off Ver
    2019
    Posts
    2

    VBA/Macro Add new rows with format based on year grouping

    I have a table of data (not this one, but much larger). I'd like to add some code lines to automatically add a year row starting with the first line of each year. See photos for examples. I can probably figure out the code to add a new line based on the column B year date, but how do I avoid doing that for every single line that has a 2019 or 2018 or 2017, etc year?

    Original.JPGWIthFormat.JPG

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2003,2007,2010
    Posts
    32,518

    Re: VBA/Macro Add new rows with format based on year grouping

    See the yellow banner at the top of the page.
    Trevor Shuttleworth - Excel Aid

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    12-10-2019
    Location
    Colorado
    MS-Off Ver
    2019
    Posts
    2

    Re: VBA/Macro Add new rows with format based on year grouping

    See attached for the actual .xlsm file. Thanks for any help you can provide!
    Attached Files Attached Files

+ 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. Macro to copy rows and populate month/year based on start date?
    By ekwacillin in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-26-2016, 03:35 PM
  2. Grouping Rows Based on Values in Another Cell
    By tu.nguyenq512 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-06-2016, 12:25 AM
  3. Grouping rows based on 2 column values
    By anvilofstars in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-29-2015, 12:39 PM
  4. [SOLVED] Grouping and then pasting rows based off value in cell
    By hambly in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-15-2013, 01:01 PM
  5. Grouping rows based on partial match
    By bobrob in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-18-2012, 06:11 PM
  6. Grouping rows based on common values
    By jfd456 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-26-2012, 06:31 AM
  7. VBA for automatically grouping rows based on text
    By Dannypak in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-24-2011, 06:24 AM

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