Dim lastrow as Long, i as long
dim cnt as long
lastrow = cells(rows.count,1).End(xlup).row
for i = Lastrow to 1 step - 1
cnt = application.CountA(cells(i,1).EntireRow)
if cnt <> 11 and cnt <> 4 then
cells(i,1).Entirerow.Delete
end if
Next
Dim LastRow As Long, i As Long
LastRow = Cells(Rows.Count, 1).End(xlUp).Row
For i = LastRow To 1 Step -1
Select Case Application.CountA(Rows(i))
Case 11, 4
Case Else: Rows(i).Delete
End Select
Next i
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.