delete row if a cell is blank
Nevermind, I think I was able to find the answer from Dave Ritchie.
Thanks!
Steve
Sub EliminateBlankColumnC()
On Error Resume Next ' In case there are no blanks
Columns("C:C").SpecialCells(xlCellTypeBlanks).Enti reRow.Delete
ActiveSheet.UsedRange 'Resets UsedRange for Excel 97
End Sub
Steve Mackay wrote:
Hi All,
I would like to write a basic macro that will search a column and
delete a row if the cell is blank
A
1 Orange
2
3 Apple
4 Pear
5
6 Grape
For instance, I would like the macro to delete rows two and five in the
above example. The number of rows to search will vary, so maybe it
would be easier to start at the bottom of the worksheet and work up.
Also, there may be text in other columns, so the whole row won't
necessarily be blank.
Thanks,
Steve
|