Hello all
I hope you can help on this, This code currently inserts a column in column "A" and creates a unique key value
It then copy all the data with the unique key in a sheet called "Comments"
What I need in to copy this data but after the last populate row in "Comments" so it does not overwrite the existing data. Can someone please point me in the right direction on how to do this
I hope you can help on this, This code currently inserts a column in column "A" and creates a unique key value
It then copy all the data with the unique key in a sheet called "Comments"
What I need in to copy this data but after the last populate row in "Comments" so it does not overwrite the existing data. Can someone please point me in the right direction on how to do this
Code:
Columns("A:A").Insert Shift:=xlToRight
Range("A1").FormulaR1C1 = "Key"
With Range("A2:A" & LastRow)
.FormulaR1C1 = "=RC[4]&RC[6]&RC[4]"
.Value = .Value
End With
Sheets("Data").Columns("A").Copy Destination:=Sheets("Comments").Columns("A")
Sheets("Data").Columns("B").Copy Destination:=Sheets("Comments").Columns("B")
Sheets("Data").Columns("C").Copy Destination:=Sheets("Comments").Columns("C")
Sheets("Data").Columns("D").Copy Destination:=Sheets("Comments").Columns("D")
Sheets("Data").Columns("E").Copy Destination:=Sheets("Comments").Columns("E")
Sheets("Data").Columns("N").Copy Destination:=Sheets("Comments").Columns("F")