Hi everyone,
I am new to VBA and still trying to get my head around VBA coding. Any help will be much appreciated.
I want to copy and paste the values from range (S19:S29) to range (E56:E66), if any change happens to range (S19:S29). Then I want to remove the duplicate in range (S19:S29), so I can create a drop-down list of unique values. The code I created is as below:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address(0, 0) = "S19:S29" Then Range("S19:S29").Copy
ActiveSheet.Paste Destination:=Worksheets("WorkSheet1").Range("E56:E66")
ActiveSheet.Range("E56:E66").RemoveDuplicates Columns:=5, Header:=xlYes
End Sub
I am new to VBA and still trying to get my head around VBA coding. Any help will be much appreciated.
I want to copy and paste the values from range (S19:S29) to range (E56:E66), if any change happens to range (S19:S29). Then I want to remove the duplicate in range (S19:S29), so I can create a drop-down list of unique values. The code I created is as below:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address(0, 0) = "S19:S29" Then Range("S19:S29").Copy
ActiveSheet.Paste Destination:=Worksheets("WorkSheet1").Range("E56:E66")
ActiveSheet.Range("E56:E66").RemoveDuplicates Columns:=5, Header:=xlYes
End Sub