1. Does the column contain a title? If so, what row?
2. What is the range of columns in your dataset?
3. Please explain in more detail WPU0578....etc.
So that we can get it right the first time, can we see a sample of your worksheet?
You can upload a sample of your workbook to Box Net, sensitive data scrubbed/removed/changed
mark the workbook for sharing
and provide us with a link to your workbook.
Sub sumbyemp2()
Dim i As Long
Dim LR As Long
Application.ScreenUpdating = False
Sheets("sheet1").Select
LR = Cells(Rows.Count, 1).End(xlUp).Row
For i = LR To 2 Step -1
If Range("a" & i) <> "WPU0576" And Range("a" & i) <> "WPU0577" And Range("a" & i) <> "WPU0578" Then
Range("a" & i).EntireRow.Delete Shift:=xlUp
End If
Next i
Application.ScreenUpdating = True
End Sub
If you need to add more criteria just add them to this line
If Range("a" & i) <> "WPU0576" And Range("a" & i) <> "WPU0577" And Range("a" & i) <> "WPU0578" and condition4 and condition 5 Then
add conditions with this code
And Range("a" & i) <> "add value here"
And Range("a" & i) <> "add value here"
We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel
Which adblocker are you using?
Disable AdBlock
Follow these easy steps to disable AdBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the icon in the browser’s toolbar. 2)Click on the "Pause on this site" option.
Go back
Disable AdBlock Plus
Follow these easy steps to disable AdBlock Plus
1)Click on the icon in the browser’s toolbar. 2)Click on the toggle to disable it for "mrexcel.com".
Go back
Disable uBlock Origin
Follow these easy steps to disable uBlock Origin
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.
Go back
Disable uBlock
Follow these easy steps to disable uBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.