Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
On Error GoTo Thoat
If Target.Address = "$A$5" Then
Range("A6:C1000").ClearContents
With Sheet1.Range("A1").CurrentRegion
.Offset(.Rows.Count)(1, 1) = " "
Sheet1.Range(.Find(Target).Offset(1), .Find(Target).End(xlDown).Offset(-1)).Resize(, 3).Copy
Target.Offset(1).PasteSpecial 3
.Offset(.Rows.Count)(1, 1).Clear
End With
With Range("C65536").End(xlUp)
.Offset(1, -2) = "Tong"
.Offset(1, 0) = WorksheetFunction.Sum(Range(.Cells, .End(xlUp)))
End With
Target.Select
End If
Thoat:
End Sub