I THINK this is the code as tested, i might have played with a couple little
things. but those should be obvious because they don't work :)
Sub testArray()
Dim a1(65536, 2) As Variant
Dim a2(65536, 1) As Variant
Dim StartTime As Single
Dim EndTime As Single
StartTime = Timer
For i = 1 To 65536
a1(i, 1) = Cells(i, 1)
a1(i, 2) = Cells(i, 2)
a2(i, 1) = Cells(i, 3)
Next
For i = 1 To 65536
For j = 1 To 65536
If a2(i, 1) = a1(j, 1) Then
Cells(i, 4) = a1(j, 2)
Exit For
End If
Next
Next
EndTime = Timer
MsgBox "Time taken: " & EndTime - StartTime & " seconds"
End Sub
Sub testVlookup()
Dim a1(10000, 2) As Variant
Dim a2(10000, 1) As Variant
Dim StartTime As Single
Dim EndTime As Single
StartTime = Timer
For i = 1 To 10000
a1(i, 1) = Cells(i, 1)
a1(i, 2) = Cells(i, 2)
a2(i, 1) = Cells(i, 3)
Next
For i = 1 To 10000
Cells(i, 4) = Application.VLookup(a2(i, 1), a1, 2, False)
Next
EndTime = Timer
MsgBox "Time taken: " & EndTime - StartTime & " seconds"
End Sub
Sub testFunction()
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
Dim StartTime As Single
Dim EndTime As Single
StartTime = Timer
For i = 1 To 65536
Cells(i, 4) = "=VLOOKUP(C" & i & ",$A$1:$B$65536,2,FALSE)"
Next
EndTime = Timer
MsgBox "Time taken: " & EndTime - StartTime & " seconds"
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic
End Sub
Sub testHybrid()
Dim a1(10000, 2) As Variant
Dim a2(10000, 2) As Variant
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
Dim StartTime As Single
Dim EndTime As Single
StartTime = Timer
For i = 1 To 10000
a1(i, 1) = Cells(i, 1)
a1(i, 2) = Cells(i, 2)
a2(i, 1) = Cells(i, 3)
Next
For i = 1 To 10000
Cells(1, 4) = "=VLOOKUP(C" & i & ",$A$1:$B$10000,2,FALSE)"
a2(i, 2) = Cells(1, 4)
Next
For i = 1 To 10000
Cells(i, 4) = a2(i, 2)
Next
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic
EndTime = Timer
MsgBox "Time taken: " & EndTime - StartTime & " seconds"
End Sub

Signature
-John
Please rate when your question is answered to help us and others know what
is helpful.
> Can you post the exact code you used for each test?