I am working on some data from which I want to extract unique values from a column and storing them in an array and later using it for other calculations.
Sub A_Unique_B()
Dim X
Dim objDict As Object
Dim lngRow As Long
Set objDict = CreateObject("Scripting.Dictionary")
X = Application.Transpose(Range([E1], Cells(Rows.Count, "E").End(xlUp)))
For lngRow = 1 To UBound(X, 1)
objDict(X(lngRow)) = 1
Next
Range("K1:K" & objDict.Count) = Application.Transpose(objDict.keys)
End Sub
The Data set is found here. Now I want the code to take the input using an input box which column to search([E1] here) for unique values and where the output is stored ("K1:K" here).