View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Mikey Mikey is offline
external usenet poster
 
Posts: 38
Default Selecting Blank Cells then deleting those rows

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