I have a code to copy columns A:L. Paste the unique rows to columns O:Z. Somehow, the code is overwriting column W with values from column G.
Here is the code:
Here is the code:
VBA Code:
Sub oneUserPerRow()
Dim lastCol As Long, lastRow As Long, r As Long, i As Long
Dim Rng As Range, Rng1 As Range, Rng2 As Range, Rng3 As Range
'Application.ScreenUpdating = False
With Sheets("Sheet1")
Set Rng = .UsedRange
Set Rng1 = Intersect(Rng, .Range("A:A"))
lastCol = Rng.Column + Rng.Columns.Count - 1
.Range("A:L").AdvancedFilter Action:=xlFilterCopy, _
CopyToRange:=.Cells(1, lastCol + 2), Unique:=True
Columns("O:Z").Copy Destination:=Sheets("Employee Sheet").Columns("A:L")
'Columns("O:Z").EntireColumn.Delete
End With
[/CODE
][ATTACH type="full"]70759[/ATTACH][ATTACH type="full"]70760[/ATTACH]