Variable copy/paste

jlieu

New Member
Joined
Jun 9, 2015
Messages
11
I have a template that copy and pastes values/cell formats to 11 columns (11 columns = 1 printed page), offsets the activecell by 11 and does it again for as long as I want. The first column being text. The problem I have is that the 11 columns reference another worksheet that is formatted to 10 columns. I attempted a for loop to offset by 2 to skip the text column however the formula skips 2 as well (A1 changes to C1) when I need it to go (A1 to B1) although it is moving over 2 cells.

Range("B12").Select
selection.Copy
Dim sample As Integer
For sample = 1 To Range("E5").Value

If sample Mod 10 = 0 Then
ActiveSheet.Paste
ActiveCell.Offset(0, 2).Select

Else
ActiveSheet.Paste
ActiveCell.Offset(0, 1).Select
End If
Next sample
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Found a solution! Inserting a column on the second worksheet, now it's 11 and 11 ._. I don't know how to delete this thread...
 
Upvote 0

Forum statistics

Threads
1,214,606
Messages
6,120,497
Members
448,967
Latest member
visheshkotha

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