Selecting Blank Cells then deleting those rows
Assuming your cells in Column D have **data** in them so that your =""
condition means an empty cell, and **not formulas** that evaluate to "",
then give this "non looping" macro a try...
Sub DeleteEmptyCellsColumnC()
On Error Resume Next
Columns("D").SpecialCells(xlCellTypeBlanks).Entire Row.Delete
End Sub
--
Rick (MVP - Excel)
"Mikey" wrote in message
...
Ryan responded with this code to highlight the cells. What code would
delete
the rows?
------------------------
So you just want to "Select" the cell? Use this,
Sub Highlighter()
Dim lngLastRow As Long
Dim rng As Range
lngLastRow = Cells(Rows.Count, "D").End(xlUp).Row
For Each rng In Range("D1:D" & lngLastRow)
If IsEmpty(rng) Then
rng.Select
Exit For
End If
Next rng
End Sub
--
Cheers,
Ryan
--
Mickey
|