A counter and copy column problem

andy-s

Board Regular
Joined
Mar 22, 2002
Messages
51
I've some problem making a macro that will copy the information in Column B to Column C the first time, then from Column B to Column D the next time and so on.

I do know how to make the macro working by using a the Range and Cells command like:

Counter = Sheets("Sheet1").Cells(1, 1)
Range("B1:B6000").Select
Selection.Copy
Cells(1, Counter + 1).Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False

BUT since the excel file grows by roughly 1MB each time I run the macro, I can not use it. The strange part is that the file only grows by a few bytes when I mark Column B and use the copy/paste function to Column C, D, E etc.

So, in order to save place I'm looking for a macro that can copy column. Can you help me?

andy-s
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Counter = Sheets("Sheet1").Cells(1, 1)
Sheets("Sheet1").Columns("B:B").Copy
Sheets("Sheet1").Columns(Counter + 1).PasteSpecial Paste:=xlValues, _
Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False

Try the above inplace of your original code...

Tom
This message was edited by TsTom on 2002-04-21 13:55
 
Upvote 0

Forum statistics

Threads
1,213,484
Messages
6,113,923
Members
448,533
Latest member
thietbibeboiwasaco

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