+ Reply to Thread
Results 1 to 5 of 5

Auto inserting empty rows into a populated sheet

  1. #1
    Forum Contributor
    Join Date
    04-23-2012
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    107

    Auto inserting empty rows into a populated sheet

    Hi

    I am looking at importing a file that could have up to 1000 populated lines in it. there will be no empty rows in between the lines. I then need to ensure that there are 10 empty rows inserted in between every populated row. I was thinking of doing it manually and recording it on a macro.... However the issue will have with this is that everyday the number of rows will vary.

    is there anyway of auto inserting 10 empty rows in between populated ones?

  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: Auto inserting empty rows into a populated sheet

    This little routine will add the rows on the activesheet. Add it to your existing macro or call it separately:

    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
    Forum Contributor
    Join Date
    04-23-2012
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    107

    Re: Auto inserting empty rows into a populated sheet

    Quote Originally Posted by JBeaucaire View Post
    This little routine will add the rows on the activesheet. Add it to your existing macro or call it separately:

    Please Login or Register  to view this content.
    Brilliant

    many thanks

  4. #4
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Auto inserting empty rows into a populated sheet

    Try this code
    Please Login or Register  to view this content.
    Copy the Excel VBA code
    Select the workbook in which you want to store the Excel VBA code
    Hold the Alt key, and press the F11 key, to open the Visual Basic Editor
    Choose Insert | Module
    Where the cursor is flashing, choose Edit | Paste

    To run the Excel VBA code:
    Choose View | Macros
    Select a macro in the list, and click the Run button.

    Edit: Oops, i didnt refresh my page before posting my solution. Nevertheless, you can try both.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  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: Auto inserting empty rows into a populated sheet

    If that takes care of your need, please select Thread Tools from menu above and set this topic to SOLVED.

+ 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