+ Reply to Thread
Results 1 to 7 of 7

Referencing cells in a closed workbook

  1. #1
    Registered User
    Join Date
    08-19-2015
    Location
    Colmar, Pa
    MS-Off Ver
    2013
    Posts
    4

    Referencing cells in a closed workbook

    Hi

    Can somebody help me out with a reference issue? I want to reference a cell in a closed work book from a particular server. The path looks like this

    \\server_name\folder1\folder2\folder3\[workbook1.xlsx]worksheet!$A$2

    It doesnt like that format. Im getting #REF.
    The internet is only showing me how to do it when I want to reference a worksheet on my desktop or a specific computer. I want to reference worksheets on our network so that its not specifically tied to my computer.

    Anyone have any advice for me?

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,705

    Re: Referencing cells in a closed workbook

    This error does not necessarily mean that it doesn't like the format of the file path. When reporting an error please provide more context. What is the actual formula you are using? Some Excel functions return a #REF error if the referenced workbook is not open.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    08-19-2015
    Location
    Colmar, Pa
    MS-Off Ver
    2013
    Posts
    4

    Re: Referencing cells in a closed workbook

    After playing around with it I realize, like you said, that it wasn't the file path that caused the error. Im trying to reference a closed workbook with the function INDIRECT. Basically I want to use a formula similar to this one:

    INDIRECT("'"&$A$2&"'!"&B3)

    This references a specific worksheet whose name is in cell A2.

    I instead would like to reference a closed workbook whose path is in A2. Is there anyway to do this?

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,705

    Re: Referencing cells in a closed workbook

    INDIRECT always returns an error on reference to a closed workbook.

    There are workarounds involving macros, where VBA will open the file or use other somewhat more esoteric techniques to retrieve data from a closed workbook. One such workaround is to use something like INDIRECT.EXT, a plug-in with a VBA user-defined function. Another workaround is using VBA to build the cell reference rather than using INDIRECT; if the value in A2 changes, the code creates a hard-coded cell reference.

    I can help out with a VBA solution if you would like to go that direction.

  5. #5
    Registered User
    Join Date
    08-19-2015
    Location
    Colmar, Pa
    MS-Off Ver
    2013
    Posts
    4

    Re: Referencing cells in a closed workbook

    I had looked into indirect.ext when I stumbled upon it by accident on Google. It said that it wasn't compatible with the 64bit version though which is what I have.

    I do like the idea of using VBA to build the cell reference. Is that hard? I started using VBA 2 days ago, so I'm very knew at it. I don't wanna take up too much of your time but if you can point me in the right direction to get started I'm sure I can figure it out. Thanks a lot for your time!

  6. #6
    Forum Contributor
    Join Date
    08-14-2013
    Location
    Florida
    MS-Off Ver
    Excel 2013
    Posts
    105

    Re: Referencing cells in a closed workbook

    I beat this one to death when I wanted to work with closed workbook. I ended up using Active Data Object Database Connection (ADODB). This YouTube video is very helpful:
    https://www.youtube.com/watch?v=5GjKpPemO10

    YourProgrammingNetwork (his video) also helped me with the SQL statements and other such things for doing what you want. Worth looking into if you don't care to open and close those other workbooks when you want one to have all the info.

  7. #7
    Registered User
    Join Date
    08-19-2015
    Location
    Colmar, Pa
    MS-Off Ver
    2013
    Posts
    4

    Re: Referencing cells in a closed workbook

    Thanks! I'll look into it tonight. I really appreciate it

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Referencing a closed workbook
    By blacktrek in forum Excel General
    Replies: 6
    Last Post: 05-25-2015, 02:52 PM
  2. [SOLVED] How do I get the following formula to work when referencing a closed workbook?
    By HumbleAko in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-26-2015, 05:46 PM
  3. Sumifs used referencing a closed workbook
    By kgallo in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-20-2015, 06:57 PM
  4. [SOLVED] Trouble copying data from closed workbook into active workbook, referencing help
    By lepperga in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-20-2013, 01:48 PM
  5. [SOLVED] Referencing a closed workbook
    By RowanB in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-03-2012, 05:13 AM
  6. UDF referencing closed workbook not working
    By davegugg in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 05-25-2010, 09:17 PM
  7. referencing a named range from a closed workbook
    By Gixxer_J_97 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-08-2005, 04:06 PM

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