I have about 30 data tables on one worksheet that pull data from another worksheet via array formulas.
Now there is possibly 2 very different solutions for what I need, however I will likely address the other in another post.
Each table has been set to 30 rows to allow for new entries to appear on the source data sheet, which will be pulled into the relevant table, however not all the rows are used - sometimes only a single row is populated.
I have set the filters to remove blanks and therefore hiding all the empty row in the tables, each time the worksheet is activated - this makes it much more visually acceptable to the user than thousands of rows of nothing.
A cut of the code I've used is:
Private Sub Worksheet_Activate()
Application.ScreenUpdating = False
ActiveSheet.ListObjects("AandA").Range.AutoFilter Field:=1
ActiveSheet.ListObjects("AandA").Range.AutoFilter Field:=1, Criteria1:="<>"
ActiveSheet.ListObjects("BAU").Range.AutoFilter Field:=1
ActiveSheet.ListObjects("BAU").Range.AutoFilter Field:=1, Criteria1:="<>"
ActiveSheet.ListObjects("Clash").Range.AutoFilter Field:=1
ActiveSheet.ListObjects("Clash").Range.AutoFilter Field:=1, Criteria1:="<>"
ActiveSheet.ListObjects("DTP").Range.AutoFilter Field:=1
ActiveSheet.ListObjects("DTP").Range.AutoFilter Field:=1, Criteria1:="<>"
Application.ScreenUpdating = True
End Sub
Is there a cleaner way of doing this by selecting all tables and applying these filter settings?
I live in 'Formula world' usually but I'd expect something like 'for all list.Objects do' or something.
Bookmarks