Hello
I'm trying to get a unique list of names using the advanced filter but my code is just showing the first unique item.
Can someone help me please?
Thanks in advance
I'm trying to get a unique list of names using the advanced filter but my code is just showing the first unique item.
Can someone help me please?
Thanks in advance
VBA Code:
Sub Proveedores_UniqueList()
Dim ws1 As Worksheet, ws2 As Worksheet
Dim LR As Long
Set wsSource = ThisWorkbook.Sheets("DB_PDP").Range("PDP_ProveedoresRange")
Set wsTarget = ThisWorkbook.Sheets("Proveedores_UniqueList")
Set rngTopCell = wsSource.Offset(1, 0)
Set rngBottomCell = wsSource.Offset(wsSource.CurrentRegion.Rows.Count - 1, 0)
Set rngEntireRange = Range(rngTopCell, rngBottomCell)
rngEntireRange.AdvancedFilter Action:=xlFilterCopy, CopyToRange:=wsTarget.Range("A:A"), Unique:=True
End Sub