+ Reply to Thread
Results 1 to 5 of 5

Inserting Rows after Specific Entries

  1. #1
    Registered User
    Join Date
    10-14-2009
    Location
    NJ
    MS-Off Ver
    Excel 365
    Posts
    16

    Inserting Rows after Specific Entries

    I have a sheet with a column of numbers, some numbers are singular and some appear twice, i would like to add a column after each number or after the second duplicated number.

    Ex.
    Column A
    1
    2
    2
    3
    4
    5
    5
    6
    7
    8
    8

    I would want a row after 1, the second 2, 3, 4, the second 5, 6 ,7, and the second 8. There will only ever be one or two entries per individual number never more.

    Any ideas for a code for this one?

    In addition i would also like to automatically highlight that column a certain color up to a certain column.

    Thanks.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Inserting Rows after Specific Entries

    Please Login or Register  to view this content.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    10-14-2009
    Location
    NJ
    MS-Off Ver
    Excel 365
    Posts
    16

    Re: Inserting Rows after Specific Entries

    Thanks for all the help, the adding of the rows works perfectly. I modified the code to work with Column C instead of Column A.

    I then tried to add code to automatically highlight each new row from column A to O. But when I run the code, every row is highlighted from A to O not just the new ones.

    Any suggestions?

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    10-14-2009
    Location
    NJ
    MS-Off Ver
    Excel 365
    Posts
    16

    Re: Inserting Rows after Specific Entries

    This is the last part of code for this project i need, ive tried a bunch of different combos but nothing seems to be working. please any help would be great.

  5. #5
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Inserting Rows after Specific Entries

    Please Login or Register  to view this content.

+ 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