Hello, I've searched the forum and thoroughly as I can and haven't found a solution to my issue. Apologies if I missed something.
I'm building a project resourcing sheet for my company. I would like to be able for users to enter in the number of weeks in the project into a cell and have t add a corresponding number of columns, i.e. B3=5, add 5 columns to the resourcing table.
The simple version would be generic column header names and simply have excel increment the header titles from Week 0...Week 5. The more flash version would be to title the header with the Monday of each week.
Adding a single column is pretty straightforward:
[FONT=Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif]ActiveSheet.ListObjects("myTable").ListColumns.Add
And I did see another post with code to add multiple worksheet columns that works but it's not for adding table columns:
[/FONT]
I'm building a project resourcing sheet for my company. I would like to be able for users to enter in the number of weeks in the project into a cell and have t add a corresponding number of columns, i.e. B3=5, add 5 columns to the resourcing table.
The simple version would be generic column header names and simply have excel increment the header titles from Week 0...Week 5. The more flash version would be to title the header with the Monday of each week.
Adding a single column is pretty straightforward:
[FONT=Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif]ActiveSheet.ListObjects("myTable").ListColumns.Add
And I did see another post with code to add multiple worksheet columns that works but it's not for adding table columns:
[/FONT]
VBA - Inserting a variable number of columns based on the value of a cell