Go to all "FALSE" cells

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

Guest

I need the "go to" feature to find all the cells that are FALSE then delete
and move up all of the rows that have FALSE in the selected column. The
particular column I am addressing will either have a number or FALSE and
nothing else. Thanks.
 
Use data>filter>autofilter, filter on FALSE and delete the visible rows but
the top row (header row)
 
ONe way:

Public Sub DeleteFalseRows()
Dim rDelete As Range
On Error Resume Next
Set rDelete = Columns("D").Cells.SpecialCells( _
xlCellTypeConstants, xlLogical)
On Error GoTo 0
If Not rDelete Is Nothing Then rDelete.EntireRow.Delete
End Sub

Change the column number to suit.

This assumes that FALSE is entered as a constant. If it's the result of
a formula, substitute xlCellTypeFormulas for xlCelllTypeConstants
 

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