R
Ron de Bruin
Hi
I show two friends how they can delete
empty rows with the first example that is working I send.
After trying it a copple of times both select the whole column
and lost all there data. (funny)
Found a way to avoid a problem with specialcells
If there are more then 8192 ranges the areas.count will be 1
Public Sub DeleteBlankRows()
On Error Resume Next 'In case there are no blanks
If Columns("A").SpecialCells(xlCellTypeBlanks).Areas.Count = 1 Then Exit Sub
Columns("A").SpecialCells(xlCellTypeBlanks).EntireRow.Delete
On Error GoTo 0
End Sub
I show two friends how they can delete
empty rows with the first example that is working I send.
After trying it a copple of times both select the whole column
and lost all there data. (funny)
Found a way to avoid a problem with specialcells
If there are more then 8192 ranges the areas.count will be 1
Public Sub DeleteBlankRows()
On Error Resume Next 'In case there are no blanks
If Columns("A").SpecialCells(xlCellTypeBlanks).Areas.Count = 1 Then Exit Sub
Columns("A").SpecialCells(xlCellTypeBlanks).EntireRow.Delete
On Error GoTo 0
End Sub