Deleting rows based upon the value in column D

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

Guest

Hi, I would like to delete all rows in my spreadheet that have a non-numeric
or null value in column D.

The length of my spreadsheet will vary in length and there is no column
headings in the spreadsheet, just pure data from row A onwards.

Thanks in advance.
Sean
 
On Error Resume Next
columns(4).SpecialCells(xlConstants,xlTextValues).EntireRow.Delete
columns(4).SpecialCells(xlBlanks).EntireRow.Delete
On Error goto 0

If the values are produced by formulas you can use xlFormulas,xlTextValues

if you have error values
xlFormulas,xlErrors

or Logical

xlFormulas,xlLogical

See help on special cells for other options.
 
very nice, I was able to consolidate the following three lines
recorded, into one.

Columns("B:B").Select
Selection.SpecialCells(xlCellTypeBlanks).Select
Selection.EntireRow.Delete

Thanks, To
 

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