Sub doiulieu()
Dim arr, arr1, dic As Object, i As Long, lr As Long, j As Long, dk As String, dks As String, b As Long, c As Long, d As Long
Set dic = CreateObject("scripting.dictionary")
With Sheet1
arr = .Range("D5:n9").Value
For j = 1 To UBound(arr, 2)
For i = 3 To UBound(arr, 1)
dk = CLng(arr(1, j)) & "#" & arr(i, j)
If Not dic.exists(dk) Then
dic.Item(dk) = Array(i - 4, j)
End If
Next i
Next j
lr = .Range("D" & Rows.Count).End(xlUp).Row
If lr < 11 Then Exit Sub
arr = .Range("a11:N" & lr).Value
For i = 1 To UBound(arr, 1)
If Len(arr(i, 1)) > 0 Then
If Not dic.exists(arr(i, 1)) Then
dic.Add arr(i, 1), i
End If
End If
Next i
dk = CLng(.Range("T14").Value) & "#" & .Range("V14").Value
dks = .Range("W14").Value
If dic.exists(dk) Then
b = dic.Item(dk)(0)
c = dic.Item(dk)(1)
If dic.exists(dks) Then
d = dic.Item(dks)
arr(b + d, c + 3) = .Range("u14").value
End If
End If
.Range("a11:N" & lr).Value = arr
End With
End Sub