Private Sub Worksheet_Change(ByVal Target As Range)
Dim Rws As Long, lRw As Long
Dim Rng As Range, Cls As Range: Dim MaCT As String
Rws = [G2].CurrentRegion.Rows.Count * 2
If Not Intersect(Target, [P3].Resize(Rws)) Is Nothing Then
Set Rng = Cells(Target.Row, "H").Resize(, 8)
For Each Cls In Rng
If Cls.Value <> "" Then
MaCT = Cells(1, Cls.Column).Value
With Sheets("DS KHg") '**
lRw = .[A65500].End(xlUp).Row + 1
.Cells(lRw, "A") = MaCT
.Cells(lRw, "B").Value = _
Application.WorksheetFunction.VLookup(MaCT, Sheets("Mã CT").Range("A1:B11"), 2, False) '**
.Cells(lRw, "C") = Cells(Target.Row, "A").Value ' Mã NPP'
.Cells(lRw, "D") = Cells(Target.Row, "B").Value ' Tên NPP'
.Cells(lRw, "E") = Cells(Target.Row, "D").Value ' Mã Khách Hàng'
.Cells(lRw, "F") = Cells(Target.Row, "E").Value ' Tên K Hàng'
.Cells(lRw, "F") = "Mã Chu Kì"
'??? '
End With
End If
Next Cls
MsgBox "Dã Chép Xong!", , "GPE.COM Xin Chào"
End If
End Sub