I'm trying to reference data from a table in another worksheet. I'm able to get it to work when I used cell numbers but can't get it to work when I use named ranges.
Works:
=SUM('/Path/To/File/[Book1.xlsx]Sheet1'!A2:A5)
Works when source workbook is open:
=SUM(Book1.xlsx!Table1[Column1])
Doesn't work when source workbook is closed:
=SUM('/Path/To/File/Book1.xlsx'!Table1[Column1])
I would like to use the named range due to the source table constantly being updated with values. Lastly, I'm using Excel for Mac which could be the issue but wanted to confirm. Thanks in advance.
Related
I created a directory in Sharepoint with many workbooks where my team inserts the information I need to create a dashboard.
To do this, I am trying to create (in another file) a table that uses an index/match formula to retrieve the data I need.
It works just fine, except if I open the workbook without the referenced workbook being opened the formula throws an error and all rows returns #REF!.
How Do I fix it?
Instead of referencing the workbook as
='[Filename.xlsx]Sheet1'!$H$1
Refer it with the entire path
='C:\Users\[Filename.xlsx]Sheet1'!$H$1
I'm trying to create a dynamic reference within a formula; meaning the referenced workbook and subsequent sheet name can be changed and the appropriate data loaded.
I'm aware that a static formula reference could be done as follows:
=SUM('C:\Reports\[SOTDJ17.xlsx]Summary'!C10:C25)
but I want to be able to change the workbook name, and it will reference information from that particular workbook and change the data. The workbook name
is stored in B5 and the sheet is stored in B8. I thought I might be able to use
something simple like:
=SUM('C:\Reports\[B5]B8'!C10:C25)
but it doesn't seem to work. Is there a syntax error or something else I am missing?
(I should note that I am trying to reference a closed workbook)
You'll want to use Indirect():
=SUM(INDIRECT("["&B5&"]"&B8&"!$C$10:$C$25"))
Note that the workbook you're referring to must be open.
This probably isn’t possible but is there a way of referencing a cell that contains a workbook , name , location , tab and range when using Vlookup and Match formulas ?
I have a lot of references to other workbooks but I want to keep track of all the workbooks via one location
Im using the Northwind table as an example
https://www.google.co.uk/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=0CCEQFjAAahUKEwilut7YxuXHAhUta9sKHWr-CV4&url=http%3A%2F%2Fwww.exceldashboard.org%2FNorthwind.xls&usg=AFQjCNGnhABr44N7nhF6oa5qtH9U930p0w&bvm=bv.102022582,d.d24
This should be possible using INDIRECT function. Here you can find how to use it to reference other workbook
http://www.contextures.com/xlFunctions05.html
unfortunately the function does not work if the source workbook is closed, but you can use Morefunc addin to use INDIRECT.EXT function which can reference closed workbook. Some info about it here:
http://www.ashishmathur.com/tag/indirect-ext/
http://download.cnet.com/Morefunc/3000-2077_4-10423159.html
I have a Master workbook in MS Excel that references data in 4 other workbooks.
When it opens I get the following message:
We can't update some of the links in your workbook right now.
You can continue without updating their values, or edit the links you think are wrong.
[Continue] [Edit Links...]
Each referenced workbook contains a N row, 365 column rectangular range that I have named 'DataRange'
My master workbook contains 4 lots of N row, 365 column ranges with Array Formula linked to these named ranges:
{='C:\Path\[Workbook1Name.xlsx]Sheet'![DataRange]}
It feels like i've come across an Excel bug.. Anyone know what I'm doing wrong?
Are you using MS Excel 2013, when you receive this error?
If so, it maybe due to the "3D reference in your named DataRange" in Excel 2013 or because you're referencing a range or cell in a closed workbook.
Excel allows the defining of names that refer to specific cells or ranges of cells in that workbook, similarly (using the Define Name tool in the Formulas tab) you can assign a formula to a name and then use that name in place of the formula.
The named formula or named data range is part of a collection in that workbook's (workbook1) objects and can be used in different workbook (workbook2), but the link to the defined name in the other workbook must be done one of two ways.
Link the defined name with a formula like this
='C:\Folder\Path\Workbook1.xls'!NamedFormula or NamedDataRange
Or Create a defined name in workbook2 (it can have the same defined name as workbook1's or a new name) and then refer workbook2's defined name to workbook1's defined name. Select Define Name on the Formula tab and copy a link like this in the Refers To Field:
='C:\Folder\Path\Workbook1.xls'!NamedFormula or NamedDataRange
Note these links will only work when being used in simple formulas which treat the link as a direct links. It will not work with more complex formulas when the original workbook (workbook1) is closed because the link is often treated as an indirect link in complicated formulas.
To work around this issue, use either of the following methods:
Save workbook1 and workbook2 as .xlsb files.
Do not add an external reference link to a defined name that refers to a 3D reference or named range.
Or open both workbooks
For more detail information, please refer to the following link:
https://support.microsoft.com/en-us/kb/2755120
If you're still receiving an error/ warning message after trying all my above suggestion. You might want to some troubleshooting.
Try this:
- Open Excel. Under Tools->Options->Calculation, select the Update remote
references box.
Open your workbook. Make sure the box the remote reference box is checked. Save your workbook this way after updating the link. Close workbook and Excel.Restart Excel and open your workbook.
- Look under defined names and delete all that you don't need or that have broken formulae. Run a FindLink search, to pin point the problem.
This process worked for one of workmates with this exact problem.
I hope this helps, if not let me know. There might be a 4th solution.
I finally solved this issue after going on a scavenger hunt. In my case, the reference was to an old file that no longer exists, and removing the reference was all that was needed. Unfortunately Excel does not pinpoint where the reference is, so it was a pain to look for the cell that was making the reference.
In my workbook, it was a reference as a part of a Data Validation. For others seeing the same error, I recommend using the Find & Select -> Go To Special feature (Home ribbon tab) then searching by Formula errors and and Data validation.
Open Excel
Go to "Inquire" tab page in the ribbon
Select "Workbook Analysis"
Check Items\Cells\With Validation Criteria items. In the "Validation Text" you might spot references to the extenal source.
The "Cell Address" column would give you the list of problematic cells.
Look around any other supsicious findings of the Workbook Analysis tool
Have you considered giving the data ranges different names? DataRange1, DataRange2 etc, or is this not possible due to other constraints. When excel says "some" of the links, how far has it got?
I got it working by ditching the FormulaArray and set the FormulaR1C1 for the entire range. Unfortunately the formula was a bit more complicated.
=INDEX(
'C:\Path\Workbook1Name.xlsx'!DataRange,
ROW() - ROW(Workbook1DataRange) + ROW('C:\Path\Workbook1Name.xlsx'!DataRange) - 5,
COLUMN() - COLUMN('C:\Path\Workbook1Name.xlsx'!DataRange) + 1)
I have 3 workbooks - Parent1.xlsx and Child.xlsx
Parent1.xlsx has data that will be referenced by Child.xlsx through vlookup.
The vlookup formula is
=VLOOKUP(1,[Parent1.xlsx]Sheet1!$A$1:$B$7,2,FALSE)
That works fine.
Now I have to make a copy of Parent1.xlsx to Parent2.xlsx.
In order for Child.xlsx to work I have to change the formula to
=VLOOKUP(1,[Parent2.xlsx]Sheet1!$A$1:$B$7,2,FALSE)
That is ok if its just for 1 cell, but I need to do it for many cells.
To fix this, I plan to used a named range for the file name. So in Sheet2 of Child.xlsx, I have a named range "parent" that has the name of the file - Parent2.xlsx.
I can't seem to get that to work.
If the value for the named range "parent" is
'[Parent2.xlsx]Sheet1'
then I'm trying to get
=VLOOKUP(1,parent!$A$1:$B$7,2,FALSE)
to work.
Is this even possible? Other than copy pasted everything and using VBA, is there another possibility?
Thanks
If you just need to change all the external references to the file Parent2, rather than Parent1, choose the Data tab, Edit Links and click Change Source.
Try:
"=VLOOKUP(1," & ActiveWorkbook.Names("parent").Value & "!$A$1:$B$7,2,FALSE)"
Edit: just realized this is the VBA solution. This won't work in a cell formula.