Mọi người gỡ rối cái này giúp em mới ạ, không biết sai chỗ nào mà nó không chạy, em cảm ơn.
Code
Sub CUTDATA()
Set wsout = Worksheets("DDH")
lr = wsout.Range("B" & Rows.Count).End(xlUp).Row
Set Rng = wsout.Range("B12:B" & lr).Find(wsout.Range("A8:F8").Value)
Set wsin = Worksheets(wsout.Range("G1").Value)
Do While Not Rng Is Nothing
lrin = wsin.Range("B12" & Rows.Count).End(xlUp).Row
wsout.Range("B12" & Rng.Row).Resize(1, 4).Copy wsin.Range("A" & lrin + 1)
wsout.Range("B12" & Rng.Row).Resize(1, 4).Delete (xlShiftUp)
Loop
Set wsout = Nothing
Set wsin = Nothing
Set Rng = Nothing
End Sub
https://www.facebook.com/groups/hocexcel.online/permalink/890266801072683