+ Reply to Thread
Results 1 to 4 of 4

Thread: Importing from another workbook

  1. #1
    Registered User
    Join Date
    03-13-2010
    Location
    Bedfordshire, England
    MS-Off Ver
    Excel 2003
    Posts
    49

    Importing from another workbook

    I have the following code which imports data from another workbook entitled LIONS. My question is how can I modify this so that the LIONS portion of the formula is taken from a cell, say A1?


    =IF(ISERROR('P:\PAAR SHEET\Server Upload\20102011_01_NOVEMBER\[LIONS.xls]PUPIL DATA'!CK157),"",('P:\PAAR SHEET\Server Upload\20102011_01_NOVEMBER\[LIONS.xls]PUPIL DATA'!CK157))

  2. #2
    Valued Forum Contributor MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2010
    Posts
    5,285

    Re: Importing from another workbook

    Hi,

    The "ck157" is the part that tells which cell the data is from.

    If you wanted A1 then change the ck157 to A1 and see what happens.
    One test is worth a thousand opinions.
    Click the * below to say thanks.

  3. #3
    Registered User
    Join Date
    03-13-2010
    Location
    Bedfordshire, England
    MS-Off Ver
    Excel 2003
    Posts
    49

    Re: Importing from another workbook

    Sorry think I've been miss understood, LIONS is the filename, but I have several filenames, I want the formula to take the filename from a cell so I don't have to a different formula out several times in each workbook.

    =IF(ISERROR('P:\PAAR SHEET\Server Upload\20102011_01_NOVEMBER\[(A1).xls]PUPIL DATA'!CK157),"",('P:\PAAR SHEET\Server Upload\20102011_01_NOVEMBER\[(A1).xls]PUPIL DATA'!CK157))
    I thougt something like this might work but it does not. Any suggestions gratefully recieved.

  4. #4
    Forum Guru
    Join Date
    10-28-2008
    Location
    Not here anymore
    MS-Off Ver
    irrelevant
    Posts
    10,151

    Re: Importing from another workbook

    Hello BobTheRocker,

    You can use INDIRECT to create a reference by concatenating text and cell contents. But Indirect only works with open files, so you need all your possible files open.

    =indirect("'P:\PAAR SHEET\Server Upload\20102011_01_NOVEMBER\["&A1&".xls]PUPIL DATA'!CK157")

    Alternatively, you can use Indirect.Ext from the morefunc.xll, which works with closed workbooks and can be downloaded here: http://download.cnet.com/Morefunc/30...-10423159.html

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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.2.0