I've got to go through a rather large workbook and delete certain rows. I can come up with loop but can't come up with the code to delete the row once the loop has found it.
I don't have the code written out however, I can tell you that the loop will look at the second column of the row and delete the row if this cell is empty.
I don't have the code written out
So, how can we help you to fix your code ?
A starting point:
For r = lngLastRow To lngFirstRow Step -1
If Trim(yourWorksheetObject.Cells(r, 2)) = "" Then
yourWorksheetObject.Cells(r, 2).EntireRow.Delete
End If
Next
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.