Rows("1:6").Delete Range("A:B,E:E,G:O,Q:Z,AB:AN").Delete Range("A1").Value = "POrderNo" Range("B1").Value = "Customer" Range("C1").Value = "ShiptoCode" Range("D1").Value = "VendorSKU" Range("E1").Value = "Serial" Cells.EntireColumn.AutoFit Dim Idx As Long For Idx = Cells(Cells.Rows.Count, "A").End(xlUp).Row To 2 Step -1 If Len(Cells(Idx, "a").Value) > 6 Or _ Cells(Idx, "d").Value = "SGMN4002" Or Cells(Idx, "d").Value = "SGMN4004" Then Rows(Idx).Delete End If Next
For Idx = Cells(Cells.Rows.Count, "A").End(xlUp).Row To 2 Step -1
If Len(Cells(Idx, "a").Value) > 6 Or _
Cells(Idx, "d").Value = "SGMN4002" Or Cells(Idx, "d").Value = "SGMN4004" Or Cells(Idx, "d").Value = "SGMN4003”” _
Then
Rows(Idx).Delete
End If
Next
pls try
Open in new window
Regards