#1
|
|||
|
|||
VBA: Selecting columns from multiple tables
Hi, In one sheet, I have four tables. And of those 4 tables I want the first columns to be copied to one column in another sheet. If I use record macro and select one of these columns from one table it appears as: Range("Table1[Meeting]").Select However if I select all of the specified columns in all 4 tables I get: Range("B6:B13,B18:B24,B29:B41,B46:B53").Select I've tried writing: Range("Table1[Meeting],Table2[Meeting],Table3[Meeting],Table4[Meeting]").Select However that does not work. How would I get the result I am looking for? Thank you! |
#2
|
|||
|
|||
I could be wrong, but it's my belief tables can only be worked with like that on an individual basis.
This would be why with your selection from one table only, Excel used the table and column names, and when the selection was from multiple tables Excel ignored the tables and used ranges. To use the table and column names to do the copying, I think you'll need to loop through the tables on the sheet and do it one at a time. A couple of links to pages dealing with tables that may interest you http://www.jkp-ads.com/Articles/Excel2007TablesVBA.asp http://www.thespreadsheetguru.com/bl...t-excel-tables |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Selecting First Columns | mohsen.amiri | Word Tables | 1 | 09-01-2014 01:08 AM |
Macro for selecting pages and formatting of tables | ubns | Word VBA | 25 | 08-15-2012 11:48 PM |
Formatting multiple tables and columns efficiently? | table_column | Word Tables | 1 | 07-02-2012 05:55 PM |
Why selecting two columns (x and y) for plotting produces two graphs? | Jamal NUMAN | Excel | 0 | 01-21-2012 12:42 AM |
Selecting specific text out of a series of columns | speedycorn1 | Word | 3 | 11-01-2010 02:58 PM |