I have a worksheet with 10 tables (named Table1, Table2, etc). I would like to add a column to some of the tables only (e.g., Table1, Table7 and Table9). The code below successfully works to add a column to all the tables in the worksheet. Any advice?
Sub LoopThroughMyTables()
Dim ws As Worksheet
Set ws = ActiveSheet
Dim tbl As ListObject
For Each tbl In ws.ListObjects
'add a column to the left of the Average column
Dim newColNum As Integer
newColNum = Range("CshwsTbl[Average]").Column
tbl.ListColumns.Add(newColNum).Name = "NewColumn"
Next tbl
End Sub