View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default Simple help with macro please

Brian,

Try something like the following:

Dim RowNdx As Long
For RowNdx = 20 To 1 Step -1
If Cells(RowNdx, "A").Value = "" Then
Rows(RowNdx).Delete
End If
Next RowNdx


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Brian Tozer" wrote in message
...
Can someone please give me a macro that will delete all rows in

a worksheet
that do not include any data in column A up to a maximum of row

20?

Thanks
Brian Tozer