ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   access table results after filtering (https://www.excelbanter.com/excel-programming/449850-access-table-results-after-filtering.html)

[email protected]

access table results after filtering
 
really.. this isn't home work.

Dim oWs As Worksheet: Set oWs = ActiveSheet
Dim oRg_columns As Range: Set oRg_columns = oWs.Columns("D:E")
oRg_columns.AdvancedFilter Action:=xlFilterInPlace, Unique:=True

Dim oLO_table As ListObject: Set oLO_table = oWs.ListObjects(TABLE_METRIC)

So far so good. The filtering worked. I can see the display update.

How do I iterate, row by row, thru only the results? I just ask a general question because I've tried 20 different constructs. If this is just a few lines, could I get some help? I will go to amazon now.

I want to collect a few columns from each showing row.

Thanks.


[email protected]

access table results after filtering
 
GOT IT!

Dim oRg_columns As Range
Dim oLO_table As ListObject
DIM rgT as Range

Set oRg_columns = oWs.Columns("D:E")
oRg_columns.AdvancedFilter Action:=xlFilterInPlace, Unique:=True
Set oLO_table = oWs.ListObjects(TABLE_ACTUALS)

For Each rtT In oLO_table.Range.SpecialCells(xlCellTypeVisible).Ro ws
MsgBox "row " & rt.row & ", " & rtT.cells(rtT.row, 3)
Next


All times are GMT +1. The time now is 11:41 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com