Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have the following, but I need it to be more generic.
Sub Macro5() Selection.AutoFilter Selection.AutoFilter Field:=1, Criteria1:="=" Rows("8:8").Select <---- I want this to be the first blank row not row 8. Range(Selection, Selection.End(xlDown)).Select Selection.Delete Shift:=xlUp Selection.AutoFilter Field:=1 End Sub Thanks in advance, Barb Reinhardt |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
There might be quicker ways to do it.
on error resume next Range("A9:A65536").Cells.SpecialCells(xlCellTypeBl anks).EntireRow.Delete on error goto 0 Change the range to what you want. This will only delete really empty cells--not formulas that evaluate to "". (so there is a difference) Barb Reinhardt wrote: I have the following, but I need it to be more generic. Sub Macro5() Selection.AutoFilter Selection.AutoFilter Field:=1, Criteria1:="=" Rows("8:8").Select <---- I want this to be the first blank row not row 8. Range(Selection, Selection.End(xlDown)).Select Selection.Delete Shift:=xlUp Selection.AutoFilter Field:=1 End Sub Thanks in advance, Barb Reinhardt -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Delete blank rows Macro | Excel Discussion (Misc queries) | |||
Using a macro to delete all blank rows | Excel Programming | |||
Delete blank rows in Excel with macro | Excel Programming | |||
Macro to delete blank rows | Excel Programming | |||
macro to delete entire rows when column A is blank ...a quick macro | Excel Programming |