Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi, I have an Excel worksheet and I am trying to find a way to delete
selected lines via VB, can any one help me please. Thanks |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
try pearsons page
http://www.cpearson.com/excel/deleting.htm ============ "BOSS" wrote in message ... Hi, I have an Excel worksheet and I am trying to find a way to delete selected lines via VB, can any one help me please. Thanks |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
there is another solution by David Hawley
Sub DeleteRowsBasedOnCriteria() 'Assumes the list has a heading. With ActiveSheet 'If filters are not visible then turn them on If .AutoFilterMode = False Then .Cells(1, 1).AutoFilter 'Set the filters in A1 to show only rows to delete .AutoFilter Field:=1, Criteria1:="Delete" 'Delete all visible cells under the heading. .Cells(1, 1).CurrentRegion.Offset(1, 0).SpecialCells _ (xlCellTypeVisible).EntireRow.Delete 'Remove filters .AutoFilterMode = False End With End Sub ================== "BOSS" wrote in message ... Hi, I have an Excel worksheet and I am trying to find a way to delete selected lines via VB, can any one help me please. Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Applying an AutoFilter to a string | Excel Discussion (Misc queries) | |||
How to Sort within AutoFilter with Protection on (and AutoFilter . | Excel Discussion (Misc queries) | |||
Autofilter not working correctly... | Excel Discussion (Misc queries) | |||
Using AutoFilter with worksheet protection in 2000 vs. 2003 | Excel Discussion (Misc queries) | |||
Strange Results with Autofilter | Excel Discussion (Misc queries) |