Function to del rows based on cell value

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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?
 
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*
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top