Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Seclec
Is there a code or a way to seclec row to delete with out spisifing the row
range or cell? Please see "<---" below. Thanks Selection.AutoFilter Field:=9, Criteria1:="=" Range("A42861:I42861").Select <--- It would be for this range of rows Range("I42861").Activate Range(Selection, Selection.End(xlDown)).Select Selection.EntireRow.Delete Range("I42861").Select Selection.AutoFilter Field:=9 or Selection.AutoFilter Field:=9, Criteria1:="=" Rows("2:2").Select <--- or for this range of rows Range(Selection, Selection.End(xlDown)).Select Selection.Delete Shift:=xlUp Selection.AutoFilter Field:=9 Range("A2").Select |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Seclec
Rows is a range object.
you can simply do: rows("2:2").Delete Shift:=xlUp or rows(2).Delete Shift:=xlUp you do not need to select it "pgarcia" wrote: Is there a code or a way to seclec row to delete with out spisifing the row range or cell? Please see "<---" below. Thanks Selection.AutoFilter Field:=9, Criteria1:="=" Range("A42861:I42861").Select <--- It would be for this range of rows Range("I42861").Activate Range(Selection, Selection.End(xlDown)).Select Selection.EntireRow.Delete Range("I42861").Select Selection.AutoFilter Field:=9 or Selection.AutoFilter Field:=9, Criteria1:="=" Rows("2:2").Select <--- or for this range of rows Range(Selection, Selection.End(xlDown)).Select Selection.Delete Shift:=xlUp Selection.AutoFilter Field:=9 Range("A2").Select |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Seclec
God, I didn't even test it. The 2nd code worked great, THANKS!
"barnabel" wrote: Rows is a range object. you can simply do: rows("2:2").Delete Shift:=xlUp or rows(2).Delete Shift:=xlUp you do not need to select it "pgarcia" wrote: Is there a code or a way to seclec row to delete with out spisifing the row range or cell? Please see "<---" below. Thanks Selection.AutoFilter Field:=9, Criteria1:="=" Range("A42861:I42861").Select <--- It would be for this range of rows Range("I42861").Activate Range(Selection, Selection.End(xlDown)).Select Selection.EntireRow.Delete Range("I42861").Select Selection.AutoFilter Field:=9 or Selection.AutoFilter Field:=9, Criteria1:="=" Rows("2:2").Select <--- or for this range of rows Range(Selection, Selection.End(xlDown)).Select Selection.Delete Shift:=xlUp Selection.AutoFilter Field:=9 Range("A2").Select |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|