Copy cell 6 times and paste the step and copy next cell

saxjammin

New Member
Joined
Mar 31, 2016
Messages
43
Help please I urgently need a a macro if possible to run this but if there is another way that is fine. I struggled yesterday to find a way.

I have a list of items in column AF4 to AF763 I need to copy each one 6 times into column AK4 and then step 20 the start of next one in list then repeat the same from AF5 down the list.

I can possibly do it if I can get the first one in list to copy and step 20 then copy the next in list to the end of list.

Thank you
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Are you saying you want to copy AF4 6 times
Then AF24 6 times

Is that why your saying Step 20?
 
Upvote 0
Re: Help please urgently

See if this is anything close?

Code:
Dim arr, arr2, i As Long, j As Long

With Sheets("Sheet1")
    arr = .Range("AF4:AF763")
    ReDim arr2(1 To UBound(arr) * 20)
    For i = 1 To UBound(arr, 1)
        For j = 1 To 6
            arr2((i - 1) * 20 + j) = arr(i, 1)
        Next
    Next
    .Range("AK4:AK15203") = Application.Transpose(arr2)
End With
 
Upvote 0
sorry no i want to copy AF4 6 times to column AK4 then I want to copy AF5 6 times but step 20 between them in column AK hope this is more understandable
 
Upvote 0
I still do not understand Step 20

What does Step mean?

Please try and use your words and not what you think the script needs to do.

Step ??

Do you mean you want 20 empty cells between each pasting.
 
Last edited:
Upvote 0
Hi thanks for the reply after copy 6 times from first in list i want 20 blank rows before the next copy 6 times from second in list
 
Upvote 0
Try this:
Code:
Sub Copy_Range()
'Modified  6/7/2019  4:27:13 AM  EDT
Application.ScreenUpdating = False
Dim i As Long
Dim n As Long
n = 4
    For i = 4 To 763
        Cells(n, "AK").Resize(6).Value = Cells(i, "AF").Value
            n = n + 26
    Next
Application.ScreenUpdating = True
End Sub
 
Upvote 0
I have seen several of your last postings where you have been given scripts and you have said great that works perfectly.

So how did you install those scripts and it worked perfectly but you do not know how to install this script I just provided.
 
Upvote 0

Forum statistics

Threads
1,214,885
Messages
6,122,090
Members
449,065
Latest member
Danger_SF

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top