View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] twlove@ontuet.com is offline
external usenet poster
 
Posts: 8
Default Auto delete rows within a specified range

I'm new to VBA and trying to learn how to write code. My objective is
to automatically delete entire rows between row 19 and row 28 when the
value in column 11 in any of these rows is empty (null). Following is
the code I've written which, of course, does not work.

Public Sub Delete_Rows()

Dim GlobalRange As Range

Dim Range As Range

Set GlobalRange = Application.ActiveSheet.Range("N19:N28")

For Each Range In GlobalRange
If Range.Cells = "null" Then EntireRow.Delete

Next


End Sub