LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default Navigating a filtered list

If you look at my code you'll see I do not do any "select"s or
"ActiveCell"s. My code works because the range "Cell" increments through
the range. That's what a For Each does. The pros do not use "Activecell"
unless they have to. This should run untouched with your filtered list.
Try to understand it and come back if you have any questions.

Sub a()
Dim Cell As Range
Dim Counter As Long
Dim dateA As Variant
Dim dateB As Variant
For Each Cell In Range("_FilterDatabase").Columns(1) _
.SpecialCells(xlCellTypeVisible)
Counter = Counter + 1
If Counter 2 Then
dateA = Cell.Value
dateB = Cell.Offset(0, 1).Value
MsgBox "A/B = " & dateA & "/" & dateB
End If
Next
End Sub


--
Jim Rech
Excel MVP


 
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
A list of what is being filtered on? Mel Excel Discussion (Misc queries) 5 August 27th 08 05:08 PM
charting a filtered list cathyh Excel Discussion (Misc queries) 4 June 5th 08 04:37 PM
Return Value from a Filtered List [email protected] Excel Worksheet Functions 4 August 7th 07 06:10 PM
Navigating in filtered rows anandmr65 Excel Discussion (Misc queries) 2 February 21st 06 10:04 AM
Counting a Filtered List kkrebs Excel Discussion (Misc queries) 6 September 22nd 05 02:57 PM


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