Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
DKY,
Yes, your code should work as modified. No, you don't need a Field2 for the second criteria. HTH, Bernie MS Excel MVP "DKY" wrote in message ... its for deleting rows with that text in the column. it looks like this Dim rng As Range, rng1 As Range Range("J:J").AutoFilter _ Field:=1, Criteria1:="not in system" On Error Resume Next Set rng1 = Range("J2:J65536").SpecialCells(xlVisible) On Error GoTo 0 If Not rng1 Is Nothing Then rng1.EntireRow.Delete End If Range("J1").CurrentRegion.AutoFilter So, will this work? Dim rng As Range, rng1 As Range Range("J:J").AutoFilter _ Field:=1, Criteria1:="=not in system", _ Operator:=xlOr, _ Criteria2:="=NOT OKC" On Error Resume Next Set rng1 = Range("J2:J65536").SpecialCells(xlVisible) On Error GoTo 0 If Not rng1 Is Nothing Then rng1.EntireRow.Delete End If Range("J1").CurrentRegion.AutoFilter or do I need a Field:=2 before the second criteria -- DKY ------------------------------------------------------------------------ DKY's Profile: http://www.excelforum.com/member.php...o&userid=14515 View this thread: http://www.excelforum.com/showthread...hreadid=275631 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Sum of values based on different criteria | Excel Discussion (Misc queries) | |||
Looking up values with multiple criteria | Excel Worksheet Functions | |||
one criteria/mult. values | Excel Worksheet Functions | |||
using Criteria with two possible values | Excel Programming |