Dùng code mới
Option Explicit
Sub DonHang()
Dim aNhap(), aXuat(), aDH(), res(), resN(), resX(), dic As Object
Dim sR&, sRow&, i&, ik&, tN#, tX#, tNhap#, tXuat#, strDH$, strDH2$
On Error Resume Next
With Sheets("TON_KHO")
i = .Range("C" & Rows.Count).End(xlUp).Row
If i < 8 Then...