Avatar of Andreas Hermle
Andreas Hermle
Flag for Germany

asked on 

batch create smart tables on active worksheet

Dear Experts:

On the active sheet I would like to batch create smart tables using VBA.
ActiveSheet.ListObjects("Tabelle1").TableStyle = "TableStyleMedium9"

The data on the active worksheet is organized as follows: 3 columns across and hundreds of rows that are divided intermittently by blank rows. The number of contiguously filled rows  can vary greatly.

I now would like to create hundreds  of these smart tables ("TableStyleMedium9") on the active sheet automatically using a VBA Macro, ie. ...

... the macro is to detect each area where there are contiguously filled rows and create a smart table for them starting with the name 'tbl_001', then 'tbl_002' , ... tbl_455 etc.  i.e. name them sequentially. There will be roughly 700, 800 smart tables after running the macro.
The smart tables all have a header row.

I hope this is feasible.

Help is very much appreciated. Thank you very much in advance. I have attached a sample file for your convenience.

Regards, Andreas

VBAMicrosoft ExcelMicrosoft Office

Avatar of undefined
Last Comment
Roy Cox

8/22/2022 - Mon