Sub xoa_dong()
Dim arr(), i As Variant
arr = Sheet1.Range("A4:Q" & Sheet1.Cells(Rows.Count, "B").End(xlUp).Row).Value
With Sheet1
For i = UBound(arr) To 1 Step -1
If arr(i, 1).Value = Sheet2.Range("M2") And arr(i, 2).Value = Sheet2.Range("C3") Then
.Rows(i).EntireRow.Delete
End If
Next i
End With
End Sub
Cho mỉnh hỏi ngang dong lệnh if báo lỗi object variable or with bblock variable not set. (Sheets, coo M2 và C3 là cố định)