I am attempting to cut and paste a fixed number of cells within a column to the first empty column in the sheet. The marco does this, deletes the copied column, and repeats. It works most of the time. Randomly it will paste the cells to a column that is already populated with data.
Here is the code:
Sub Macro1()
'
' Macro1 Macro
'
'
Dim kolumn As Long
Range("C64:C125").Select
Selection.Copy
Range("C1").Select
kolumn = Cells(1, Columns.Count).End(xlToLeft).Column + 1
Cells(1, kolumn).EntireColumn.Select
ActiveSheet.Paste
Rows("64:125").Select
Selection.Delete Shift:=xlUp
End Sub
Any suggestions would be greatly appreciated!
Here is the code:
Sub Macro1()
'
' Macro1 Macro
'
'
Dim kolumn As Long
Range("C64:C125").Select
Selection.Copy
Range("C1").Select
kolumn = Cells(1, Columns.Count).End(xlToLeft).Column + 1
Cells(1, kolumn).EntireColumn.Select
ActiveSheet.Paste
Rows("64:125").Select
Selection.Delete Shift:=xlUp
End Sub
Any suggestions would be greatly appreciated!