View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Duncan[_5_] Duncan[_5_] is offline
external usenet poster
 
Posts: 290
Default How can I Delete rows were the first cell is blank?

will search for empty cells in column A, change if necessary..


Application.EnableEvents = False
Range("A1").Select
i = 1
Do
ActiveCell.Offset(1, 0).Select
If ActiveCell.Value = "" Then
ActiveCell.EntireRow.Delete
End If
i = i + 1
Loop Until i = 500
Application.EnableEvents = True


Bit slow though, replace 500 for your maximum amount of cells.

like i said, bit slow, sure theres a faster way but this will work in
the meantime

Duncan


Mascot wrote:

HI,

I was wondering if there is Macro for this. I have a spreadsheet were
periodically
throughout column a the first cell is blank (the rest of the row
has Data but I don't need it. Does some one have a macro that will search for
these blank cells and delete the row?

Thanks
Mascot