Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,646
Default Stepping through an autofiltered list

Hi All,
How can I make a cycle stepping through a list previously created with
Autofilter? I need the row numbers of the list as well.
Stefi

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Stepping through an autofiltered list

Dim rng as Range, rng1 as Range
Dim cell as Range
set rng = activesheet.Autofilter.Range.columns(1)
set rng = rng.offset(1,0).Resize(rng.rows.count - 1)
On error resume Next
set rng1 = rng.SpecialCells(xlVisible)
On error goto 0
if not rng1 is nothing then
for each cell in rng1
msgbox cell.Value & " - " & cell.row
Next
End If

-
"Stefi" wrote in message
...
Hi All,
How can I make a cycle stepping through a list previously created with
Autofilter? I need the row numbers of the list as well.
Stefi



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,646
Default Stepping through an autofiltered list

Thanks, Tom! It works. It will take some time for me to understand exactly
why and how it works.
Stefi

€˛Tom Ogilvy€¯ ezt Ć*rta:

Dim rng as Range, rng1 as Range
Dim cell as Range
set rng = activesheet.Autofilter.Range.columns(1)
set rng = rng.offset(1,0).Resize(rng.rows.count - 1)
On error resume Next
set rng1 = rng.SpecialCells(xlVisible)
On error goto 0
if not rng1 is nothing then
for each cell in rng1
msgbox cell.Value & " - " & cell.row
Next
End If

-
"Stefi" wrote in message
...
Hi All,
How can I make a cycle stepping through a list previously created with
Autofilter? I need the row numbers of the list as well.
Stefi




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
Dynamic count on an Autofiltered list ttbbgg Excel Discussion (Misc queries) 3 February 13th 08 04:47 PM
Copying to an autofiltered list Phil Excel Discussion (Misc queries) 3 June 30th 05 02:08 PM
Filling An Autofiltered List Neil Excel Programming 1 August 3rd 04 01:46 AM
Filling An Autofiltered List Neil Excel Programming 0 August 2nd 04 03:05 PM
Error stepping through Autofiltered visible range Ed[_9_] Excel Programming 2 January 15th 04 05:34 PM


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