Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
filtered data
I have a sheet with auto-filter turned on. I then have a macro that copies all the data from this sheet to another sheet and applies a specific filter. This is for the user to get a printed copy of only specific data. Here's the code
NumRows = Sheets("Details").Range("A8").CurrentRegion.Rows.C ount + With Sheets("Newsprint" .Visible = Tru .Selec .Rows("8:3000").ClearContent End Wit Sheets("Details").Range("A8:AM" & NumRows).Cop Sheets("Newsprint").Range("A8").PasteSpecia Selection.AutoFilter Field:=14, Criteria1:="N The problem is once the autofilter of filed 14 is applied, this also hides the sub-total row. This doesn't do this on my original data sheet. Any Ideas? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
filtered data
If the last row of the table contains a SUBTOTAL formula, it won't be
filtered out. When you copy and paste the filtered data, it pastes values only, so the last row is filtered as a regular row. Erin wrote: I have a sheet with auto-filter turned on. I then have a macro that copies all the data from this sheet to another sheet and applies a specific filter. This is for the user to get a printed copy of only specific data. Here's the code: NumRows = Sheets("Details").Range("A8").CurrentRegion.Rows.C ount + 7 With Sheets("Newsprint") .Visible = True .Select .Rows("8:3000").ClearContents End With Sheets("Details").Range("A8:AM" & NumRows).Copy Sheets("Newsprint").Range("A8").PasteSpecial Selection.AutoFilter Field:=14, Criteria1:="N" The problem is once the autofilter of filed 14 is applied, this also hides the sub-total row. This doesn't do this on my original data sheet. Any Ideas? -- Debra Dalgleish Excel FAQ, Tips & Book List http://www.contextures.com/tiptech.html |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Return filtered values into report worksheet based on filtered valueon the data worksheet | Excel Worksheet Functions | |||
MS2007 - deleting filtered data, deletes non-visible data too | Excel Discussion (Misc queries) | |||
Filter data and fill only filtered data | Excel Discussion (Misc queries) | |||
Help to sort out filtered data from the data contained in another sheet of the same workbook | Excel Worksheet Functions | |||
Using ONLY the data filtered | Excel Discussion (Misc queries) |