Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,979
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Return filtered values into report worksheet based on filtered valueon the data worksheet dicko1 Excel Worksheet Functions 1 April 21st 09 12:27 AM
MS2007 - deleting filtered data, deletes non-visible data too Nita Excel Discussion (Misc queries) 1 December 9th 08 03:42 PM
Filter data and fill only filtered data Thad Meyers[_2_] Excel Discussion (Misc queries) 1 August 30th 07 06:26 PM
Help to sort out filtered data from the data contained in another sheet of the same workbook No News Excel Worksheet Functions 1 July 28th 06 04:04 PM
Using ONLY the data filtered Fred Zack Excel Discussion (Misc queries) 6 April 14th 06 08:01 PM


All times are GMT +1. The time now is 06:01 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"