Macro wont run

D

Dave

Hi
The macro below wont run. When I select a column of data ie: A2:A58 it is
suppose to delete the entire row if a cell in my selection is blank.
All my other macros run OK.
I'm running Excel 2003.
Will be grateful for any help.

Public Sub DeleteRowOnCell()

On Error Resume Next
Selection.SpecialCells(xlCellTypeBlanks).EntireRow.Delete
ActiveSheet.UsedRange

End Sub
 
N

Norman Jones

Hi Dave,

Your macro runs perfectly well in the sense that it deletes entire rows
corresponding to blank cells in the selected range.

It will fail to delete rows only if the selection includes no empty cells.
Note that appearance and fact are not necessarily synonymous in respect of
empty cells.
 
Top