Option Explicit
Sub test()
Dim i As Long
Dim d As Object
Dim ar, br, r As Long
Dim dw As String, kw As String
Set d = CreateObject("Scripting.Dictionary")
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
With Sheets("1")
r = .Range("a" & Rows.Count).End(xlUp).Row
ar = .Range("a1:d" & r).Value
End With
For i = 1 To UBound(ar)
kw = ar(i, 1)
If kw <> "" Then d(kw) = ar(i, 4)
Next
With Sheets("2")
r = .Range("a" & Rows.Count).End(xlUp).Row
br = Range("a1:a" & r).Value
For i = 1 To UBound(br)
dw = br(i, 1)
If d.Exists(dw) And dw <> "" Then
.Range("ac" & i) = d(dw)
End If
Next
End With
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic
End Sub