Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
A list of what is being filtered on? | Excel Discussion (Misc queries) | |||
charting a filtered list | Excel Discussion (Misc queries) | |||
Return Value from a Filtered List | Excel Worksheet Functions | |||
Navigating in filtered rows | Excel Discussion (Misc queries) | |||
Counting a Filtered List | Excel Discussion (Misc queries) |