LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 230
Default Code to replace Advanced Filter

I am applying advanced filter to determine different numbers from my data so
I can paste the result to a different cell in another sheet.
I am using the following code (only 2 parts shown), to filter the data
(using advanced filter) and this process has to occur many times (132) with
changes to the filters (cells A2 to D2) and the cells where the results need
to go. (In the code, Range C6 holds a Subtotal formula that counts the data
in that column).

I was wondering if there is a way to get my 132 different amounts without
having to go through this process and instead use some code to obtain the
various results and paste those results into the appropriate places in the
MonthStats sheet.

The FileFolDB data changes each month so the process needs to be repeated
each month.

Rob

Sheets("FileFolDB").Select
Range("A2") = "NSW"
Range("B2") = "Member"
Range("C2") = "=1"
Range("D2") = "<=99"
Range("A7:C30000").AdvancedFilter Action:=xlFilterInPlace,
CriteriaRange:= _
Range("A1:D2"), Unique:=False
Range("C6").Copy
Sheets("MonthStats").Select
Range("D3").Select
Selection.PasteSpecial Paste:=xlPasteValues

Sheets("FileFolDB").Select
Range("A2") = "NSW"
Range("B2") = "Subscriber"
Range("C2") = "=1"
Range("D2") = "<=99"
Range("A7:C30000").AdvancedFilter Action:=xlFilterInPlace,
CriteriaRange:= _
Range("A1:D2"), Unique:=False
Range("C6").Copy
Sheets("MonthStats").Select
Range("E3").Select...
Selection.PasteSpecial Paste:=xlPasteValues
etc............


 
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
Advanced Filter - filter rows < jaws4518 Excel Discussion (Misc queries) 3 November 1st 06 05:48 PM
Why won't advanced filter return filter results? jaws4518 Excel Worksheet Functions 5 September 12th 06 06:11 PM
How do I use advanced filter to filter for blank cells? Monique Excel Discussion (Misc queries) 2 March 21st 06 06:43 PM
"Criteria Range" in the "Data/Filter/Advanced Filter" to select Du TC Excel Worksheet Functions 1 May 12th 05 02:06 AM
advanced filter won't allow me to filter on bracketed text (-456.2 LucianoG Excel Discussion (Misc queries) 1 December 6th 04 08:38 PM


All times are GMT +1. The time now is 02:12 AM.

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

About Us

"It's about Microsoft Excel"