Copying columns... What am I doing wrong???

jackass209

New Member
Joined
Jul 14, 2007
Messages
49
Trying to copy columns 6 til the last non-blank column and paste it 1 column to the right. This is what I'm trying:

sh3.Columns(6 & ":" & LaatstKol).Copy
sh3.Columns(7 & ":" & LaatstKol + 1).Select
ActiveSheet.Paste

Can someone tell me what I'm doing wrong? Feeling pretty stupid over here...
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
First of all change LaatstKol

to LastCol and see what happens

Unless you have declared LaatstKol as something

Harry
 
Upvote 0
Hi Harry,

Yeah LaatstKol finds the last non-blank Column.
So changing it to LastCol wouldn't make a difference.
Any other advice by any chance?

LaatstKol = sh3.Cells(1, Columns.Count).End(xlToLeft).Column
 
Upvote 0
Why not just insert a column?

Wouldn't that have the same effect?
 
Upvote 0

Forum statistics

Threads
1,217,682
Messages
6,137,959
Members
450,101
Latest member
Mrupe86

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