Question

I have a Master workbook, looks like this: enter image description here

and I have individual statementts for all the employees which look like this:

SR Statement

I have all my dynamic named ranges working fine on the Master sheet, all looking good.

Now I notice that if I close the Master workbook, then the highlighted area where the data is supposed to be, all turns to #REF erros...

all the formulas to pull the data are like this when the workbook is open:

=INDEX('Staff Rewards Master.xls'!BenefitsData,MATCH(FirstName & " " & Surname,'Staff Rewards Master.xls'!Employees,0),MATCH(A:A,'Staff Rewards Master.xls'!BenefitNames,0))

and the formulas (naturally) become this when the Source or Master workbook is closed:

=INDEX('C:\vss\Staff Rewards Statements\Staff Rewards Master.xls'!BenefitsData,MATCH(FirstName & " " & Surname,'C:\vss\Staff Rewards Statements\Staff Rewards Master.xls'!Employees,0),MATCH(A10,'C:\vss\Staff Rewards Statements\Staff Rewards Master.xls'!BenefitNames,0))]

BTW, if I copy this to the RUN dialog (taken from the paths above), the file opens in Excel with no problem:

C:\vss\Staff Rewards Statements\Staff Rewards Master.xls

Here is the error message that I get if I calculate the Statement sheet after closing the source Master workbook:

Name Reference Error

Now, I should mention that if I remove the defined names and just put in cell references it works fine, but why can't my dynamic named ranges work?

for example, this has no problems:

=INDEX('O:\Dev\Staff Rewards Statements\[Staff Rewards Master.xls]Staff Benefits Master'!$B$7:$K$150,MATCH(FirstName & " " & Surname,'O:\Dev\Staff Rewards Statements\[Staff Rewards Master.xls]Staff Benefits Master'!$A$7:$A$150,0),MATCH(A10,'O:\Dev\Staff Rewards Statements\[Staff Rewards Master.xls]Staff Benefits Master'!$B$6:$T$6,0))

So what am I missing or doing wrong here?

Was it helpful?

Solution

You can't use names to reference ranges in closed workbooks.

I would guess (without seeing the book) that you could replace your named references with whole-column / whole-row references (as the match won't trigger on blanks). This would solve your need and wouldn't cause speed problems.

HTH

OTHER TIPS

The INDEX function could be volatile or not depending on the version of excel you are using, and it could have direct or indirect dependents. (Source:http://www.decisionmodels.com/calcsecretsi.htm).

Anyways the consequences are either it recalculates the result or not. In case it recalculates the results in this case maybe it needs opened excel files.

ME I am using the same type of directories as yours with non volatile functions and I have no problem (office 2016). Even with updating the results, each time I open the file everything is updated.

A late reply, and answered using 2016 365, but ... External references DO work in external workbooks even then they are closed. The error you are getting is indicative of where the external named reference refers to a table, such as: "=Table1[Employee]". This does not work!

What will work is where you have turned off the Excel setting /options/formulas/'Use table names in formulas'. The external named range will need to be deleted and re-setup with this setting turned off. So the new named range will be something like "=worksheet1!$D$4:$D$100". You may wish to see how the range expands when you increase the size of the table.

You may then still get an error but it will change from #ref to #value. Errors are still caused if you try and use, say, OFFSET with an externally defined named range - as hinted above, I think this is connected to the volatile nature of any formulae.

Brian Barrett

This will solve the problem for some of you. The file that I wanted to pull data from comes from our Head Office. I believe the problem is due to them not having 365 Office (OneSource) on their computer and that they are using older versions of office. I also noticed that I was not able to change the file’s Autosave to On, “AUTOSAVE TURNED OFF This workbook contains features that prevent it from using AutoSave”. The file that I wanted to pull the information into is an xlsx file. When I hovered over the Autosave it said that the Head Office file was created in an older format and to select File Save as to update the format. Well that no help as the extension on the Head Office file was also .xlsx.

So I copied the Head Office file and pasted it onto a fresh new workbook then saved it on the OneSource drive. If this doesn’t work save the Head Office file under a slightly different name or try using paste special (value) before saving the file.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top