Forum Discussion
VijayVardhan
Jan 29, 2026Copper Contributor
Excel VBA – Target a specific named table when multiple ListObjects exist on each worksheet
My workbook has 12 sheets each having the name of a month. Each sheet contains a table named LotSize?? where ?? = number of the respective month as given below. Sheet name-Table name: January-LotSi...
- Jan 29, 2026
basically you want to use:
ListObjects("LotSize"&Format(i,"00"))
instead of
ListObject(1)
you may also need or want additional error checking in case that table name doesn't exist.
m_tarler
Jan 29, 2026Bronze Contributor
basically you want to use:
ListObjects("LotSize"&Format(i,"00"))
instead of
ListObject(1)
you may also need or want additional error checking in case that table name doesn't exist.
- VijayVardhanJan 30, 2026Copper Contributor
Thanks, it works and yes it is better to check the error if the table does not exists.