Hello,
This code works but:
After removing duplicates in column "A", I get a new last row in column "A" so I must "declaire" "lrow" again so dates in column "B" are not filled in to the first "lrow".
Is there a way around this?
Thanks in advance.
This code works but:
After removing duplicates in column "A", I get a new last row in column "A" so I must "declaire" "lrow" again so dates in column "B" are not filled in to the first "lrow".
Is there a way around this?
Code:
Sub Start()
Dim ws As Worksheet
Dim lrow As Long
Set ws = ActiveSheet
[COLOR=#ff0000]lrow = ActiveSheet.Range("A" & Rows.count).End(xlUp).Row[/COLOR]
Application.ScreenUpdating = False
ws.Range("B7", ws.Cells(lrow, "U")).ClearContents
ws.Range("A7", ws.Cells(lrow, "A")).RemoveDuplicates Columns:=1, Header:=xlNo
[COLOR=#ff0000]lrow = ActiveSheet.Range("A" & Rows.count).End(xlUp).Row[/COLOR]
ws.Range("B7", ws.Cells(lrow, "B")) = Date
Application.ScreenUpdating = True
End Sub
Thanks in advance.
