Did you change the range at the top?
Here's the code wrapped by the timer code. I don't know how accurate this timer code is, but I consistently get 0.61 and 0.62 on a million rows of data. It's very fast.
Sub CalculateRunTime_Seconds()
'PURPOSE: Determine how many seconds it took for code to completely run
'SOURCE: www.TheSpreadsheetGuru.com/the-code-vault
Dim StartTime As Double
Dim SecondsElapsed As Double
'Remember time when macro starts
StartTime = Timer
Dim Dict As Scripting.Dictionary
Dim R As Variant, keys As Variant
Dim x As Long
Set Dict = New Scripting.Dictionary
R = Sheets(1).Range("A1:A1000000").Value2 'Value2 is faster than .Value
With Dict
For x = LBound(R) To UBound(R) 'Loop through Arrays by index
If R(x, 1) <> "" And Not .Exists(R(x, 1)) Then 'Check whether the element exists
.Add R(x, 1), Nothing 'Could also be empty
End If
Next x
End With
ReDim R(1 To Dict.Count, 1 To 1) 'Create an array to write to the sheet
keys = Dict.keys() 'Get the keys
For x = LBound(keys) To UBound(keys) 'Manual transpose to keys to a 2d array
R(x + 1, 1) = keys(x)
Next x
Sheets(2).Range("A1").Resize(UBound(R), 1).Value2 = R 'Write the keys to a range
'Determine how many seconds code took to run
SecondsElapsed = Round(Timer - StartTime, 2)
'Notify user in seconds
MsgBox "This code ran successfully in " & SecondsElapsed & " seconds", vbInformation
End Sub
Bookmarks