Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-21-2015, 05:43 AM
LouterMattheus LouterMattheus is offline VBA: Selecting columns from multiple tables Windows 7 32bit VBA: Selecting columns from multiple tables Office 2007
Novice
VBA: Selecting columns from multiple tables
 
Join Date: Jul 2015
Posts: 1
LouterMattheus is on a distinguished road
Default 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!
Reply With Quote
  #2  
Old 07-22-2015, 06:33 AM
NoSparks NoSparks is offline VBA: Selecting columns from multiple tables Windows 7 64bit VBA: Selecting columns from multiple tables Office 2010 64bit
Excel Hobbyist
 
Join Date: Nov 2013
Location: British Columbia, Canada
Posts: 831
NoSparks is just really niceNoSparks is just really niceNoSparks is just really niceNoSparks is just really niceNoSparks is just really nice
Default

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
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA: Selecting columns from multiple tables Selecting First Columns mohsen.amiri Word Tables 1 09-01-2014 01:08 AM
VBA: Selecting columns from multiple tables Macro for selecting pages and formatting of tables ubns Word VBA 25 08-15-2012 11:48 PM
VBA: Selecting columns from multiple tables 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
VBA: Selecting columns from multiple tables Selecting specific text out of a series of columns speedycorn1 Word 3 11-01-2010 02:58 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:41 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft