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: 414
Default Setting a Filtered Range

I am struggled to set a Filtered range.
First I set the Filter :-

objSht1.Rows("4:4").AutoFilter
objSht1.Rows("4:4").AutoFilter Field:=2, Criteria1:="Fred"
objSht1.Rows("4:4").AutoFilter Field:=6, Criteria1:="Green"
objSht1.Rows("4:4").AutoFilter Field:=13, Criteria1:="<0", Operator:=xlAnd

Now I want to set a Range to be that Filtered set. I have tried

Set FilteredRge =
objSht1.AutoFilter.Range.Resize(objSht1.AutoFilter .Range.Rows.Count - 1,
1).Offset(1, 0).Cells.SpecialCells(xlCellTypeVisible)

The idea was to omit the header from the filtered range.

This sort of works but if there are only 2 rows in my filtered range, say
row 45 and row 112, then I want to work through my filtered range and examine
cell values in that range. So, I want the 2nd row of my filted range to be
row 112 in the spreadsheet. If I use FilteredRge(2, 4).Value I get Column D
from row 46 not column D from row 112 as I want.

Can anyone help?




 
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
Sum a filtered range Peter Excel Discussion (Misc queries) 2 April 30th 09 07:57 AM
creating a filtered range/named range mark kubicki Excel Programming 1 November 4th 06 03:14 PM
setting range().hidden=True causes range error 1004 STEVE BELL Excel Programming 6 September 2nd 05 02:16 AM
traversing through a filtered range based on another filtered range zestpt[_4_] Excel Programming 4 July 12th 04 06:37 PM
filtered range MarkJ Excel Programming 7 June 26th 04 10:49 PM


All times are GMT +1. The time now is 11:53 PM.

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"