Macro-continue to paste last column

P

puiuluipui

Hi, i have a macro that copy columns A:G to sheet2, and then i select column
B and insert it before F column.
The problem is that if i run macro many times, the macro continue to add the
last column "G". So, the content of "G" column will be in "H", then in "I",
Then in "J"...and so on. I will have G column content in several columns. And
B column remains selected...
If i remove insert column, the macro works perfect.
This is my recorded macro:
Range("A1").Select
Sheets("Sheet1").Select
Columns("A:G").Select
Selection.Copy
Range("B1").Select
Sheets("Sheet2").Select
Range("A1").Select
ActiveSheet.Paste
Columns("B:B").Select
Application.CutCopyMode = False
Selection.Copy
Columns("F:F").Select
Selection.Insert Shift:=xlToRight
Range("B1").Select

How to stop this?
Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top