![]() |
AUTOFILTER
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 |
AUTOFILTER
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 |
AUTOFILTER
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 |
All times are GMT +1. The time now is 05:31 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com