Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I had posted this problem earlier but I then realized that
I had not explained myself properly (hence my reposting it). I have a report downloaded into excel and I need to clean the report to remove blank rows and embedded field names. Below is a macro I tried to use, but it's not working. I want to be able to check the contents of column A and decide if it is blank or whether it contains the field name called "Plnt". If the cell is blank or contains the text "plnt", then the macro should delete the row and move on to check the next row. Please help if you know what to do. 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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro to delete blank rows in a data range | Excel Discussion (Misc queries) | |||
Delete blank rows Macro | Excel Discussion (Misc queries) | |||
Macro to delete blank rows | Excel Programming | |||
Macro to look for blank rows in sheet, delete the row and autofit | Excel Programming | |||
macro to delete entire rows when column A is blank ...a quick macro | Excel Programming |