The dictionary items are not showing
Code:
Sub Tracker()Dim a, w(), i As Long, ii As Long, n As Long, z As String, ws As Worksheet, dic As Object
Sheets("Tracker").Range("a6: b100000 ").ClearContents
Set dic = CreateObject("Scripting.Dictionary")
dic.CompareMode = vbTextCompare
For Each ws In Worksheets
If ws.Name = "Collections Tracker" Or ws.Name = "Collections Tracker Musty" Then
a = Sheets(ws.Name).Range("a6").CurrentRegion.Resize(, 3).Value
For i = 6 To UBound(a, 1)
z = a(i, 2)
If Not dic.exists(z) Then
ReDim w(2 To 3)
For ii = 2 To 3: w(ii) = a(i, ii): Next
dic.Add z, b
End If
Next
End If
Next ws
Sheets("Tracker").Range("a6").Resize(dic.Count, 2).Value = Application.Transpose(Application.Transpose(dic.items))
Sheets("Tracker").Range("a5:b100000").Sort Key1:=Range("b5"), Header:=xlYes, Order1:=xlAscending
End Sub