LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Repeated application of AutoFilter

Hi,
I am attempting to apply an autofilter in a loop (to
compute subtotals). I have a single cell selected

Set ws = WorkSheet(1)
ws.Range("A1").Select
Selection.AutoFilter Field:=1, Criteria1:=FieldVal

FieldVal changes with every iteration of the loop.
I am attempting to get the special cells with

Set FilterData = ws.Range("A1")
MsgBox( FilterData.CurrentRegion.SpecialCells _
(xlVisible).Areas.Count)

The last statement gives me a value of 1 sometimes for
the second iteration and higher of my loop.

Unsure what I am doing wrong here.
Any help is much appreicated.
thanks,
-shishir


 
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
excel 2007 autofilter change to 2003 autofilter functionality? jonnybrovo815 Excel Discussion (Misc queries) 1 April 19th 10 10:05 PM
2007 excel autofilter back to 2003 autofilter? jonnybrovo815 Excel Discussion (Misc queries) 3 April 19th 10 08:11 PM
2007 excel autofilter change back to 2003 autofilter? jonnybrovo815 Excel Discussion (Misc queries) 1 April 19th 10 05:53 PM
Selective Autofilter Application Maurice Excel Discussion (Misc queries) 7 September 29th 06 03:13 PM
Printing text in a repeated cell/row that is longer than repeated Valerie Dyet Excel Discussion (Misc queries) 1 February 13th 06 03:27 AM


All times are GMT +1. The time now is 09:55 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"