Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Deleting empty rows and field names in report
I have a report which has embedded into it, blank rows and
the names of fields at the beginning of each page. I tried to do a macro to seach in column A in excel for blank cells and cells with the name of the first field called plnt; the macro should then delete those fields. Unfortunately, I am just learning visual basic and can't do it. Below is what I had done. Please help. Thanks. Pele Sub MacDeleterows() ' ' MacDeleterows Macro ' Range("a2").Select Do Until ActiveCell.SpecialCells(xlCellTypeLastCell) If ActiveCell = "" Or ActiveCell = "plnt" Then Selection.EntireRow.Delete ActiveCell.Offset(1, 0).Select 'Range("A1").Select 'ActiveCell.SpecialCells(xlLastCell).Select End If Loop End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Deleting empty rows | New Users to Excel | |||
deleting empty rows | Excel Discussion (Misc queries) | |||
Deleting All Empty Rows | Excel Discussion (Misc queries) | |||
Pivot Tables: How do I show ALL field rows, including empty rows?? | Excel Worksheet Functions | |||
Deleting empty rows | Excel Programming |