Hi all,
I have some imported data and rows 5 and 6 need swapping, the imported data can contain different amounts of data meaning that the number of columns used can be different.
I have tried the following but can't seem to get it to work
Thanks for any help
Andy
I have some imported data and rows 5 and 6 need swapping, the imported data can contain different amounts of data meaning that the number of columns used can be different.
I have tried the following but can't seem to get it to work
Code:
Sub Macro3()
Dim LastCol As Long
With ActiveSheet
LastCol = .Cells(5, Columns.Count).End(xlToLeft).Column
Range("A5:LastCol").Select
Selection.Cut
Range("A7:LastCol").Select
Selection.Insert Shift:=xlDown
End With
End Sub
Thanks for any help
Andy