Copy 1 cell to a range of cells and loop every 3 rows

ArtPur

New Member
Joined
Nov 19, 2013
Messages
5
Here are the individual lines of code. How does one create a macro loop instead of all the lines of code:

Range("D21").Select 'copy Subject
Selection.Copy
Range("E21:O21").Select
Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False

Range("D24").Select 'copy Next Subject
Selection.Copy
Range("E24:O24").Select
Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False

Range("D27").Select 'copy Next Subject
Selection.Copy
Range("E27:O27").Select
Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False

Range("D30").Select 'copy Next Subject
Selection.Copy
Range("E30:O30").Select
Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False

Range("D33").Select 'copy Next Subject
Selection.Copy
Range("E33:O33").Select
Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False

Range("D36").Select 'copy Next Subject
Selection.Copy
Range("E36:O36").Select
Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False

Range("D39").Select 'copy Next Subject
Selection.Copy
Range("E39:O39").Select
Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False

Range("D42").Select 'copy Next Subject
Selection.Copy
Range("E42:O42").Select
Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False

Range("D45").Select 'copy Next Subject
Selection.Copy
Range("E45:O45").Select
Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False

Range("D48").Select 'copy Next Subject
Selection.Copy
Range("E48:O48").Select
Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False

I'm not too sure about the cell references. This must take place in the active worksheet of a workbook that has 67 worksheets. I can loop through the worksheets but this has me a bit stuck.

Thanks in advance.
 
<code>Got it ... thanks
for count = 21 to 48 step 3 Range("D" & Count).copy Range("E" & count & ":O" & count) next</code></pre>
 
Upvote 0

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