+ Reply to Thread
Results 1 to 3 of 3

How would I write a macro that would Copy the first 5 rows after an empty row...

  1. #1
    Registered User
    Join Date
    04-05-2012
    Location
    Southfield, Michigan
    MS-Off Ver
    Excel 2003
    Posts
    63

    How would I write a macro that would Copy the first 5 rows after an empty row...

    Hi Everyone,

    My name is RJ and I've been a member for a long time but this is my first actual post.

    What I need to do seems easy, but I just don't know enough about VBA yet to program what I need.

    Basically, I have a worksheet that gets a bunch of data records dumped into it. The first problem was, the dump did not insert a blank row between each new record. But I wrote a macro to fix that.

    -The data is ALWAYS in Column A of Sheet1
    -Each Record consists of anywhere from 10 to 15 rows.
    -The rows can go into the 20,000s...

    NOW, THIS WHAT I'M TRYING TO DO:

    a) I need to copy the first row of data FOLLOWING EACH EMPTY ROW I inserted to separate each record in Sheet1
    b) Paste those rows into Sheet2

    This seems like is should be a simple thing to do, but I can't figure the dang thing out.

    Any help would be greatly appreciated!

    Thanks,

    RJ

  2. #2
    Forum Expert
    Join Date
    08-28-2014
    Location
    Texas, USA
    MS-Off Ver
    2016
    Posts
    1,796

    Re: How would I write a macro that would Copy the first 5 rows after an empty row...

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    04-05-2012
    Location
    Southfield, Michigan
    MS-Off Ver
    Excel 2003
    Posts
    63

    Re: How would I write a macro that would Copy the first 5 rows after an empty row...

    Thanks a ton, walrus!

    This worked beautifully!

+ 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. [SOLVED] How to write a code within a loop to copy and paste rows on to another Sheet
    By swade730 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-24-2014, 08:40 PM
  2. Change macro to write to next empty row of table?
    By humboldtguy in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-20-2014, 03:17 AM
  3. Need help with a macro to copy rows into two columns, ignoring empty cells.
    By ukeleleperson in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-24-2014, 04:51 AM
  4. Copy rows until empty row?
    By revenge4ash89 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-12-2012, 10:11 AM
  5. How do I write a macro to delete all rows from the first empty ro.
    By Jon M in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-12-2005, 01:06 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