Navigating through filtered cells
Hi,
I'd like to step through rows of a column of cells which are visible due to me setting a filter. I may want to assign values to empty cells based on the values of neighboring rows. Since the data is filtered, there may be many "behind-the-scenes" rows that are not shown to me. What are the VB navigation commands that I can use to step my way through each row and reference only the visible cells immediately above and below cells of interest? Thanks much, Reney |
Navigating through filtered cells
Have a look
Sub Macro2() Set Rg = Selection.CurrentRegion.SpecialCells(xlCellTypeVis ible) For Each Cell In Rg If Intersect(Cell.Offset(1, 1), Rg) Is Nothing Then ''''Exit Sub Else Cell.Offset(1, 1).Select End If Next End Sub --- Message posted from http://www.ExcelForum.com/ |
All times are GMT +1. The time now is 04:34 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com