+ Reply to Thread
Results 1 to 5 of 5

Inserting blank rows

  1. #1
    Registered User
    Join Date
    07-18-2009
    Location
    Hamlin, New York
    MS-Off Ver
    Excel 2000
    Posts
    4

    Inserting blank rows

    Hi, I have a column of data that has duplicate info in it. What I would like to do is have a macro to insert 2 blank rows after it finds the next set of different data. The data varies from day to day.
    EX: Some times there might only be 3 cells that has 1 kind of data, then the next 1 cell would have different data, then there might be 2 cells that have a different set of data, then there could be 1 cell that has different data.
    See attachment.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    10-10-2008
    Location
    Northeast Pennsylvania, USA
    MS-Off Ver
    Excel 2007
    Posts
    2,387

    Re: Inserting blank rows

    tekiert1,

    Welcome to the Excel Forum.

    Please TEST this FIRST in a COPY of your workbook (always make a backup copy before trying new code, you never know what you might lose).

    Adding the Macro
    1. Copy the below macro, by highlighting the macro code and pressing the keys CTRL+C
    2. Open your workbook
    3. Press the keys ALT+F11 to open the Visual Basic Editor
    4. Press the keys ALT+I to activate the Insert menu
    5. Press M to insert a Standard Module
    6. Paste the code by pressing the keys CTRL+V
    7. Press the keys ALT+Q to exit the Editor, and return to Excel.

    Please Login or Register  to view this content.

    Then run the "InsertBlankRows" macro.
    Have a great day,
    Stan

    Windows 10, Excel 2007, on a PC.

    If you are satisfied with the solution(s) provided, please mark your thread as Solved by clicking EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

  3. #3
    Registered User
    Join Date
    07-18-2009
    Location
    Hamlin, New York
    MS-Off Ver
    Excel 2000
    Posts
    4

    Re: Inserting blank rows

    Thank you. It worked. I have a another issue with this. The data I'm actually working with is in column "B". Is there away to have this work looking into Column "B"?

  4. #4
    Forum Expert
    Join Date
    10-10-2008
    Location
    Northeast Pennsylvania, USA
    MS-Off Ver
    Excel 2007
    Posts
    2,387

    Re: Inserting blank rows

    tekiert1,

    Try:

    Please Login or Register  to view this content.
    Last edited by stanleydgromjr; 07-20-2009 at 10:31 PM.

  5. #5
    Registered User
    Join Date
    07-18-2009
    Location
    Hamlin, New York
    MS-Off Ver
    Excel 2000
    Posts
    4

    Re: Inserting blank rows

    Thank you!! It worked like a charm.

+ 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