Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi, this question is related to another Auto Filter macro question I had last
week (see below for the URL if interested). I think the title of this question is clear enough. I have about 2000 rows of data. I would like to delete all the rows where the Value in any cell in Column V is less than 2.5. How do I do this? Thanks very much! Regards Steve C http://www.microsoft.com/office/comm...xp=&sloc=en-us |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Steve
We used this in that thread DeleteValue = "*Total*" Now we use DeleteValue = "<2.5" Sub Delete_with_Autofilter() Dim DeleteValue As String Dim rng As Range DeleteValue = "<2.5" With ActiveSheet .Range("V1:V2000").AutoFilter Field:=1, Criteria1:=DeleteValue With ActiveSheet.AutoFilter.Range On Error Resume Next Set rng = .Offset(1, 0).Resize(.Rows.Count - 1, 1) _ .SpecialCells(xlCellTypeVisible) On Error GoTo 0 If Not rng Is Nothing Then rng.EntireRow.Delete End With .AutoFilterMode = False End With End Sub -- Regards Ron de Bruin http://www.rondebruin.nl "SteveC" wrote in message ... Hi, this question is related to another Auto Filter macro question I had last week (see below for the URL if interested). I think the title of this question is clear enough. I have about 2000 rows of data. I would like to delete all the rows where the Value in any cell in Column V is less than 2.5. How do I do this? Thanks very much! Regards Steve C http://www.microsoft.com/office/comm...xp=&sloc=en-us |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Delete rows with nothing in Column B | Excel Programming | |||
delete rows if value in column D is repeated | Excel Programming | |||
Delete all rows where Column A contains Text | Excel Worksheet Functions | |||
Is there a quick way to delete all duplicate rows in a column? | Excel Discussion (Misc queries) | |||
Delete All Rows That Column A value is not in Column A of Sheet2 | Excel Programming |