So I have this code which uses the dictionary object to find unique values in column F. Some of the code was pieced together from internet examples and my current knowledge. I understand how it works except for this line.. What does the "= 1" do? Does it matter what that is set to? Any information is appreciated. Below is the full code:![]()
DXNRY(CStr(Range("F" & z))) = 1
![]()
Function unique() Dim a As Long, z As Long Dim v As Variant Dim DXNRY As Object Set DXNRY = CreateObject("Scripting.Dictionary") '------------------------------------------------------------------- 'Makes sure the Formatting Page is activated. Worksheets("Formatting").Activate 'Counts and stores data length a = Range("A" & Rows.Count).End(xlUp).Row '------------------------------------------------------------------- For z = 1 To a DXNRY(CStr(Range("F" & z))) = 1 Next z For Each v In DXNRY.Keys Debug.Print v Next v DXNRY.RemoveAll Set DXNRY = Nothing End Function
Bookmarks