+ Reply to Thread
Results 1 to 4 of 4

Import a column to another workbook

  1. #1
    Forum Contributor
    Join Date
    07-16-2009
    Location
    NA
    MS-Off Ver
    MS Excel 2010
    Posts
    237

    Import a column to another workbook

    I want to import several columns from a workbook (closed) into a new workbook and be able to refresh the data every time the new workbook is open. Is this posible using import or I must use formulas?

  2. #2
    Valued Forum Contributor
    Join Date
    08-23-2009
    Location
    Hampshire, UK
    MS-Off Ver
    Excel 2003, Excel 2007
    Posts
    328

    Re: Import a column to another workbook

    You can do it with import. If the columns you want to copy are next to each other, select them all and give them a name. If not, select them individually and give each a different name. Save & close the file. In the new workbook, click on the cell where you want the data to go and Data - Import External Data - Import Data. Navigate to the closed file, click on it and the new named ranges should appear. Select the first one and the data should appear in the new workbook. Repeat for the other names.
    If you want the queries to refresh automatically when you open the file you can use the following code in the workbook module
    Please Login or Register  to view this content.

  3. #3
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Import a column to another workbook

    or just with a formula like

    =[example.xls]Sheet1!A1

    and copied down. You will be prompted if you want to update the cells when the workbook is opened.

  4. #4
    Forum Contributor
    Join Date
    07-16-2009
    Location
    NA
    MS-Off Ver
    MS Excel 2010
    Posts
    237

    Re: Import a column to another workbook

    Thanks for your suggestions. Teylyn, I new how to do it with a formula but the problem is that it works very sluggish using formula for import because I don't know exactly how many rows a specific column has. So it can be 5000 or 3498 etc. And thusly, I need to have a long range of these formulas to be sure I don't miss anything.
    I will test your code Huron when I get home. Could be very usefull. Thank you both for replying.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1