Copy cells and past every 100 cells

ExcelRoy

Well-known Member
Joined
Oct 2, 2006
Messages
2,540
Office Version
  1. 365
Platform
  1. Windows
Hi,

I am looking to copy cells B40:B50 and paste them into B202:B212, B364:B374 until B16078:B16088

Would there be some code to achieve this?

Thanks Guys
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Try...

Code:
Sub Foo()
Range("B40:B50").Copy
For i = 202 To 16078 Step 162
    Range("B" & i).PasteSpecial xlPasteValues
Next i
End Sub
 
Upvote 0
Hi Jim,

Many thanks for that. I was kind of hoping to copy formula's aswell?

Is this possible

Thanks
 
Upvote 0
Hi Jim,

Many thanks for that. I was kind of hoping to copy formula's aswell?

Is this possible

Thanks

Use xlPasteFormulas instead of xlPasteValues

If you don't want the formula to change the results of the copied cells, use formulas with absolute reference i.e. with $ sign
 
Upvote 0

Forum statistics

Threads
1,224,545
Messages
6,179,432
Members
452,915
Latest member
hannnahheileen

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