Delete row with no data
Ok, it did work. How ever I have to high-lit the rows that have no data and
click "delete". Where is some kind of data there but it does not show. I did
find a " ' " in when of the cells, but that did not seem to be the problem.
How can I get around this? I seem that colum A does not have data.
"Vergel Adriano" wrote:
maybe something like this
Sub test()
Dim c As Range
Dim rngDelete As Range
For Each c In ActiveSheet.Range("A106:A205")
If WorksheetFunction.CountA(c.Resize(1, 9)) = 0 Then
If rngDelete Is Nothing Then
Set rngDelete = c.EntireRow
Else
Set rngDelete = Union(rngDelete, c.EntireRow)
End If
End If
Next c
If Not rngDelete Is Nothing Then rngDelete.Delete
End Sub
--
Hope that helps.
Vergel Adriano
"pgarcia" wrote:
I'm looking to delete rows that have no data from A106:I205. This will always
be a fixed spot.
Thanks.
|