FryGirl
Well-known Member
- Joined
- Nov 11, 2008
- Messages
- 1,366
- Office Version
- 365
- 2016
- Platform
- Windows
This code works find to extract unique records out of column R (Sheet FY17), but I need to also match column D (Sheet FY17) against the value in AG1 (Sheet Workcount).
Any thoughts?
Any thoughts?
Code:
Sub FilterUnique()
Dim rng As Range, Dn As Range
With Sheets("FY17")
Set rng = .Range(.Range("R2"), .Range("R" & .Rows.Count).End(xlUp))
End With
Debug.Print rng.Address
With CreateObject("scripting.dictionary")
.CompareMode = vbTextCompare
For Each Dn In rng
If Not .exists(Dn.Value) Then
.Add Dn.Value, ""
End If
Next
Sheets("Workcount").Range("AG2").Resize(.Count).Value = Application.Transpose(.keys)
End With
End Sub
Last edited: