How to copy every nth cell in a column to a form and autofill?

BBAmog

New Member
Joined
Jan 19, 2017
Messages
8
[FONT=&quot]Hi. Been searching and struggeling with this a while now. Here is the deal:[/FONT]

[FONT=&quot]I have a list (a column few hundred numbers). I also have a form (A whole A4 page) that i want to fill out with this list. Therefore i want to copy a cell in the list to another cell in the form, drag down the whole form and autofill the next few hundred forms. The roblem is that the cell I copy is pasted every 50 row, it does not take A1+1.[/FONT]

[FONT=&quot]Example:[/FONT]
[FONT=&quot]I want to copy A1 to Sheet 2 A4[/FONT]
[FONT=&quot]Next A2 to Sheet 2 A50[/FONT]
[FONT=&quot]Next A3 to Sheet 2 A100[/FONT]

[FONT=&quot]I AM BEGGING FOR SOME HELP. [/FONT]
icon_fou.gif
[FONT=&quot] [/FONT]

[FONT=&quot]Cheers.[/FONT]
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
something like

Code:
Sub test()
Dim rng As Range, i As Long
i = 1
For Each rng In Sheet1.Range("A1:A" & Sheet1.Range("A" & Rows.Count).End(xlUp).Row)
rng.Copy Sheet2.Range("A" & i)
i = Round((i + 50) / 10, 0) * 10
Next
End Sub
 
Upvote 0
Hi. Hmm i get the message: Run-time error '424':

Object required.

I think you are on to something, but im not quite there.
 
Upvote 0
try

Code:
Sub test()
Dim rng As Range, i As Long
i = 1
For Each rng In Sheets("Sheet1").Range("A1:A" & Sheets("Sheet1").Range("A" & Rows.Count).End(xlUp).Row)
rng.Copy Sheets("Sheet2").Range("A" & i)
i = Round((i + 50) / 10, 0) * 10
Next
End Sub
 
Upvote 0
Hmmm. Now i get:
Run-time error '9'

Subscript out of range

tryig to change the code, but im not very good at this.
 
Upvote 0
Its almost there! I changed the Sheet1 is called Ark1 in norwegian. I want to start by copying A1 to A4, then A2 to 54. So close
 
Upvote 0
Its almost there! I changed the Sheet1 is called Ark1 in norwegian. I want to start by copying A1 to A4, then A2 to 54. So close
 
Upvote 0
Code:
Sub test()
Dim rng As Range, i As Long
i = 4
For Each rng In Sheets("Ark").Range("A1:A" & Sheets("Ark1").Range("A" & Rows.Count).End(xlUp).Row)
rng.Copy Sheets("Sheet2").Range("A" & i)
i = I +50
Next
End Sub
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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