I have data in Col on Sheet "Imported Data" . I want to copy the unique records to sheets
When running the macro the first time, It extracts the unique records. However when running a second time, it extracts all the the records in Col C on nsheet "Imported Data"
It would be appreciated if someone could amend my code
When running the macro the first time, It extracts the unique records. However when running a second time, it extracts all the the records in Col C on nsheet "Imported Data"
It would be appreciated if someone could amend my code
Code:
Sub Extract_Unique_Branches()
Sheets("Branches").Select
Dim LR1 As Long
LR1 = Cells(Rows.Count, "A").End(xlUp).Row
Range("a1:A" & LR1).ClearContents
Sheets("Imported Data").Select
Dim LR As Long
LR = Cells(Rows.Count, "A").End(xlUp).Row
Application.ScreenUpdating = False
Sheets("Imported Data").Range("C1:C" & LR).Copy Destination:=Sheets("Branches").Range("A1")
Sheets("Branches").Range("A2:A" & LR1).RemoveDuplicates Columns:=1, Header:=xlNo
Application.ScreenUpdating = True
End Sub