View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Marie Bayes Marie Bayes is offline
external usenet poster
 
Posts: 84
Default Delete blank rows

Hi
Wonder if you can help. I would like to put in some code to automatically
(on open) do the following:

Find the cell (in column A) with the word "Date" in, if the two rows above
this are blank, delete them.

Can anyone help? I do have the following code already in and would like to
add the above to it:
Private Sub workbook_open()

Sheets("Sheet2").Select
Cells.Select
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Cells.EntireColumn.AutoFit
End Sub

--
Marie Bayes