Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
last cell in filter
I want to use the filter option to filter several columns
of data. I then want a code that will select all the filtered data from cell A1 to the last cell in the last row and column of the filtered data. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
last cell in filter
If this is an autofilter and the headers are in row1, starting in column 1
then Dim rng as Range, rng1 as Range set rng = Activesheet.autofilter.Range.Columns1 set rng1 = rng.specialCells(xlVisible) set rng1 = intersect(rng,rng1.EntireRow) rng1.Select If you just want to copy the visible cells Dim rng as Range set rng = Activesheet.autofilter.Range rng.copy Destination:=Worksheets("Sheet2").Range("A1") as an example. The default behavior is to only copy the visible cells. -- Regards, Tom Ogilvy "scrabtree" wrote in message ... I want to use the filter option to filter several columns of data. I then want a code that will select all the filtered data from cell A1 to the last cell in the last row and column of the filtered data. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to filter on a color of a cell | Excel Discussion (Misc queries) | |||
Filter substring of a cell | Excel Discussion (Misc queries) | |||
Adv Filter with Ref Cell | Excel Worksheet Functions | |||
filter by colored cell? | Excel Worksheet Functions | |||
Can I filter just one cell instead of the whole row? | Excel Discussion (Misc queries) |