Sub UNIQUE()
Dim AR() As Variant: AR = Range("G2:G" & Range("G" & Rows.Count).End(xlUp).Row).Value
With CreateObject("System.Collections.ArrayList")
For i = 1 To UBound(AR)
If Not .Contains(AR(i, 1)) Then .Add AR(i, 1)
Next i
.Sort
Range("H2").Resize(.Count, 1).Value = Application.Transpose(.toArray)
End With
End Sub
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
RemoveDupes = Table.Distinct(Source),
Sort = Table.Sort(RemoveDupes,{{"Column1", Order.Ascending}})
in
Sort
Sheets("Summary").Range("G1:G" & LRsum).AdvancedFilter Action:=xlFilterCopy, CopyToRange:=ActiveSheet.Range("H1:H" & LRsum), Unique:=True
FWIW you only need to specify the first cell of the CopyTo rangeCode:Sheets("Summary").Range("G1:G" & LRsum).AdvancedFilter Action:=xlFilterCopy, CopyToRange:=ActiveSheet.Range("H1:H" & LRsum), Unique:=True
EDIT: ah ha...found it. I needed to remove "ActiveSheet" from the above code and specifically reference the Summary sheet. Phew! Thanks again!!!
CopyToRange:=Sheets("Summary").Range("H1")