Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub selection()
Dim rng As Range Rows("2:10").Delete Shift:=xlUp Range("A1").AutoFilter Set rng = Selection rng.AutoFilter Field:=14, Criteria1:="=NAME", Operator:=xlAnd Set rng = rng.SpecialCells(xlCellTypeVisible) 'you can now work with the rng object End Sub -- HTH RP (remove nothere from the email address if mailing direct) wrote in message oups.com... I'm doing this in a macro: Sub selection() ' ' Macro recorded 22/12/2005 by Me ' Rows("2:10").Select Selection.Delete Shift:=xlUp Range("A1").Select Selection.AutoFilter ActiveWindow.SmallScroll ToRight:=2 Selection.AutoFilter Field:=14, Criteria1:="=NAME", Operator:=xlAnd 'Select the result here End Sub After the AutoFilter action, I need to select only the resulting rows and columns (with datas) and save them in a .csv file, knowing that the result will vary from one day to another I have tried several things, but the problem is that all the rows and columns (even those not displayed) are always selected and saved. I want only to have the ones given by the autofilter. Who can help me? Geo |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Select cells after Autofilter | Excel Worksheet Functions | |||
Autofilter launching action | Excel Discussion (Misc queries) | |||
Autofilter - on select columns | Excel Worksheet Functions | |||
referencing autofilter result | Excel Discussion (Misc queries) | |||
Using the result of autofilter and performing tasks on each value | Excel Programming |