Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Loop through Filtered Data

Is there a method to loop thorugh each row of a filtered data set? Should I
just copy the filtered data set to another sheet and run my loop there since
the data will be in sequential rows? Thanks.

Mike
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Loop through Filtered Data

Dim rng as Range, rng1 as Range
Dim rng2 as Range
set rng = activesheet.autofilter.range
set rng1 = rng.offset(1,0).resize(rng.rows.count-1,1)
On error resume next
set rng2 = rng1.specialCells(xlVisible)
On error goto 0
if not rng2 is nothing then
for each cell in rng2
msgbox rng2.Address
Next
End if

--
Regards,
Tom Ogilvy

"MJRay" wrote in message
...
Is there a method to loop thorugh each row of a filtered data set? Should

I
just copy the filtered data set to another sheet and run my loop there

since
the data will be in sequential rows? Thanks.

Mike



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
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
For Loop in Filtered List Hafeez Esmail Excel Programming 0 December 18th 03 05:48 PM
loop thru auto-filtered list Thomas[_5_] Excel Programming 1 September 17th 03 07:51 AM


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

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"