+ Reply to Thread
Results 1 to 2 of 2

Copy range into every 2nd of a pair of blank rows.

  1. #1
    Registered User
    Join Date
    07-03-2015
    Location
    Zurich
    MS-Off Ver
    2007
    Posts
    3

    Copy range into every 2nd of a pair of blank rows.

    Hi again,

    I am pretty new to VBA, and encouterd a probelm I can not solve by myself.

    Right now I am trying to prgramm a VBA that copies a row (Range e6:U6) to into every 2 blank rows that exist in the a specified range (E7:U300).

    To make it more understandable, I have a list that has data from Range E7:U200. I already managed to write a macro that identifies when there is a change in value in Column R (Say I start with 4 cells that have the input “XXXX” Followed by cells that have “YYYY”) and then inserts two blank rows. However, I now want to copy into the second of those blank rows the input that is in Range (E6:U6).

    Is there any lean macro that can do that?

    Many thanks for your help in advance

    J

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,864

    Re: Copy range into every 2nd of a pair of blank rows.

    so you probably have already identified rownumbers of this two blank rows Let's assume it is stored in a variable mynewrow1 (upper one)

    then you need just
    Please Login or Register  to view this content.
    and after all your workong with data is finished it's probably worth writing another line of code:
    Please Login or Register  to view this content.
    Best Regards,

    Kaper

+ 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] Formula: copy rows in a range, based on non-blank values in one of the columns
    By Glenn Kennedy in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-16-2013, 09:08 AM
  2. Copy cell values (not formulas) from a pair of rows then paste in a new set of rows
    By pelle3988 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-23-2013, 02:49 PM
  3. Copy and paste non blank rows from a range
    By mcinnes01 in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 10-12-2010, 09:29 AM
  4. Copy range without blank rows
    By HuskerBronco in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-14-2010, 01:38 PM
  5. remove blank rows and copy new range
    By twofootgiant in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-27-2010, 09:11 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