Forum Discussion
Suma_shankar
Jul 14, 2020Copper Contributor
Need help with excel vba
xspJody I have two worksheets 1- copy 2- dest
Firstly, I have to delete 1 and 5 column and then copy data from 2nd column to 4 th column and paste in dest sheet next to available column (means next to last column used).
Firstly, I have to delete 1 and 5 column and then copy data from 2nd column to 4 th column and paste in dest sheet next to available column (means next to last column used).
- Rolf-42Iron Contributor
Hello Suma_shankar
Maybe you have more chances to get your answer in the Excel community here:
https://techcommunity.microsoft.com/t5/excel/ct-p/Excel_Cat
Good luck
Cheers
Rolf
#MCT #LearnWithRolf #TheCloud42 - xspJodyCopper Contributor
If you're still looking for a solution you could try this
Sub MySub() ActiveCell.Columns("A:E").EntireColumn.Select Selection.Copy Windows("Book2").Activate ActiveCell.Range("A1").Select Selection.End(xlToRight).Select ActiveCell.Offset(0, 1).Columns("A:A").EntireColumn.Select Selection.Insert Shift:=xlToRight End Sub