Function to del rows based on cell value

R

Reed

I want to search a range of cells (column R). If any of the cells in column
"R" are blank/null, I want to delete the row. What is the best way to
accomplish this for a wheet or a workbook?
 
J

JE McGimpsey

One way:

Select column R. Choose Edit/Go To/Special, select blanks and click OK.
Right-click one of the selected cells and choose Delete. Select Entire
Row from the popup, and click OK.


or, via macro:


Public Sub DeleteBlankRows()
On Error Resume Next
Columns(18).SpecialCells(xlCellTypeBlanks).EntireRow.Delete
On Error GoTo 0
End Sub

You can find many other ways in the archives:

http://groups.google.com/advanced_group_search?as_ugroup=*excel*
 
Top