OK, this might not be what you were looking for or expecting ... but maybe just use a Pivot Table. You can use the ConCatAll UDF (by TigerAvatar) to get the comma separated list.
And you can add buttons to switch between Table 2 and Table 3.
Relatively easy to implement:
Option Explicit
Private Sub btnRefresh_Click()
ActiveSheet.PivotTables("PivotTable2"). _
PivotCache. _
Refresh
End Sub
Private Sub btnTable2_Click()
ActiveSheet.PivotTables("PivotTable2"). _
PivotFields("Master Product ID"). _
ClearAllFilters
End Sub
Private Sub btnTable3_Click()
With ActiveSheet.PivotTables("PivotTable2").PivotFields("Master Product ID")
.PivotItems("1").Visible = False
.PivotItems("2").Visible = False
.PivotItems("3").Visible = False
.PivotItems("4").Visible = False
.PivotItems("16").Visible = False
.PivotItems("43").Visible = False
.PivotItems("85").Visible = False
.PivotItems("89").Visible = False
End With
End Sub
Regards, TMS
Bookmarks