+ Reply to Thread
Results 1 to 6 of 6

Formulas referencing cells in a closed workbook

  1. #1
    Registered User
    Join Date
    02-18-2009
    Location
    Apex, NC, USA
    MS-Off Ver
    Office 365
    Posts
    64

    Formulas referencing cells in a closed workbook

    I am finding inconsistency whether two separate formulas are successful in referencing cells in a closed workbook. I would would like not to always open the normally closed referenced workbook and have both formula's work if the referenced workbook is closed or open.

    The following formula works when the referenced workbook is either open or closed:

    Please Login or Register  to view this content.
    Where CamperListCampWorkbook is a defined name in the referencing workbook ; ='Camper Names V6-0.xlsm'!Camperlist'

    and Camper Names 6-0.xlsm is the filename of the referenced workbook
    and CamperList is a defined range defined in the referenced workbook.

    The referenced workbook is set in an Edit Links entry.

    I have many of these formula's on 20 worksheets in the referencing workbook and would prefer not to change them....and shouldn't since these references are working just fine on the open or closed workbook


    The following formula works only when the referenced workbook is open:

    Please Login or Register  to view this content.
    I had originally written this formula using the INDEX function, but that didn't work with the referenced workbook closed. I have been previously told that OFFSET is more stable than INDEX, so I switched to OFFSET in this formula hoping that would solve my problem. It did not.

    Remedially, I wrote a VBA macro that checks if the referenced workbook is open and if not, opens it. I would prefer to disable this macro.

    Advice, please.

  2. #2
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Formulas referencing cells in a closed workbook

    I think your reference is not right as it should have the full path in it.
    Usually, you create your reference with both workbook open then you close the referenced one so that the path is included in your formula.
    like in this formula:
    Please Login or Register  to view this content.
    Pierre Leclerc
    _______________________________________________________

    If you like the help you got,
    Click on the STAR "Add reputation" icon at the bottom.

  3. #3
    Registered User
    Join Date
    02-18-2009
    Location
    Apex, NC, USA
    MS-Off Ver
    Office 365
    Posts
    64

    Re: Formulas referencing cells in a closed workbook

    Interesting: The one that works doesn't have the full path in it. I thought the full path was gathered by Excel by connecting the file name with the information in the Edit Links entry. If I did what you are suggesting, do you think I will still be able to use edit links to adjust when I move the referenced workbook?

    Thanks for your help.

  4. #4
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Formulas referencing cells in a closed workbook

    yes, you will still be able to use edit links.

  5. #5
    Registered User
    Join Date
    02-18-2009
    Location
    Apex, NC, USA
    MS-Off Ver
    Office 365
    Posts
    64

    Re: Formulas referencing cells in a closed workbook

    I must be doing something wrong. With both files open:

    As a test I entered into the referencing workbook:
    Please Login or Register  to view this content.
    from that I got the right answer (6)

    So then I copied the fully qualified path into the formula as

    Please Login or Register  to view this content.
    (That's without pressing enter.) When I press enter it resolves to #Ref

    and the formula changes to:

    Please Login or Register  to view this content.
    It seems to insert the unqualified file name and the defined name "Campers" back into the formula.


    What's going on here?

    Thanks again for you continued help

  6. #6
    Registered User
    Join Date
    02-18-2009
    Location
    Apex, NC, USA
    MS-Off Ver
    Office 365
    Posts
    64

    Re: Formulas referencing cells in a closed workbook

    I did some more experimenting:

    I still don't know why the formula changed, but I re-read your advice and see that I am to close the referenced workbook...before clicking enter on the formula. That worked!

    That must have been what I did when I entered the first formulas that I cited in my first post. I did that long ago (5 years at least)...and likely did it unwittingly. Thanks. I think you solved my problem.

+ 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 cells in a closed workbook
    By ms418 in forum Excel General
    Replies: 6
    Last Post: 08-20-2015, 05:43 PM
  2. Referencing cells in a closed workbook
    By ms418 in forum ExcelTip.com Feedback / Comments / Suggestions
    Replies: 0
    Last Post: 08-19-2015, 09:38 AM
  3. Referencing a closed workbook
    By blacktrek in forum Excel General
    Replies: 6
    Last Post: 05-25-2015, 02:52 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. Replies: 1
    Last Post: 06-06-2013, 07:39 PM
  6. [SOLVED] Referencing a closed workbook
    By RowanB in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-03-2012, 05:13 AM
  7. VBA code to create formulas referencing cells in another workbook
    By new.vbacoder in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-09-2010, 05:11 PM

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.6.0 RC 1