• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Need a Macro Code : Copying the values below the inserted blank rows

Hi awesome ninjas,

I have a macro code given below:

Code:
Sub Macro ()

'1:  Declare your variables.
    Dim MyRange As Range
    Dim iCounter As Long

'2:  Define the target Range.
    Set MyRange = Range("a28:ck1011")

'3:  Start reverse looping through the range.
    For iCounter = MyRange.Rows.Count To 5 Step -3
   
'4: Insert one blank row.
    MyRange.Rows(iCounter).EntireRow.Insert
   
'Step 5: Increment the counter down
    Next iCounter
   
End Sub
My problem is to have code that would copy the values below the inserted blank row (Step 4) . Thanking in advance for the usual assistance.
 
Last edited by a moderator:
delvillardennis
Your code tries to insert some rows ...
Which values would the code copy?
There is missing that information at all.
Upload a sample file which shows clear - before and after situations.
 
delvillardennis
Your code tries to insert some rows ...
Which values would the code copy?
There is missing that information at all.
Upload a sample file which shows clear - before and after situations.

Hi vietm,

Attached is the sample file. Sorry for the confusion.
Warm regards.
 

Attachments

  • Inserting Blank Rows & Copy Value below Row.xlsm
    80.6 KB · Views: 3
delvillardennis
I checked Your expected result from top and from bottom ...
I also checked that I wrote Upload a sample file which shows clear - before and after situations.
There were ... colors and so ... but where is that clear part which show Your needs?
 
delvillardennis
I checked Your expected result from top and from bottom ...
I also checked that I wrote Upload a sample file which shows clear - before and after situations.
There were ... colors and so ... but where is that clear part which show Your needs?

Hi vletm,

Please find below the explanation... thank you and kind regards.
62458
 
delvillardennis
Your original thread and Your samples didn't match ...
I gotta do this ... 'my way'
I left 'ORIGINAL's for reference.
Press [ Insert Rows ] -button
 

Attachments

  • Inserting Blank Rows & Copy Value below Row.xlsm
    80.4 KB · Views: 3
Back
Top