Macro-continue to paste last column
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! |
All times are GMT +1. The time now is 01:55 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com