Dữ liệu đã được xếp thứ tự
Sub ABC()
Dim arr(), res(), stt&(), sRow&, i&, j&, key$, tKey$, nam&, tNam&, yy$
Const GhiChu$ = "NT,XG,XS"
With Sheets("Nhapxuat")
arr = .Range("G10", .Range("AA" & Rows.Count).End(xlUp)).value
End With
sRow = UBound(arr)
ReDim res(1 To sRow, 1 To 1)...