How can I fix this Excel Workbook Linking Error - excel

I'm trying to change links between workbooks and usually they're fine but I'm receiving an error now that says, " you can't enter this formula because it has too many values cell references and/or names." I understand what it says but I'm not too sure how to rectify it. Can anyone help?

I had the same issue and found a workaround:
Instead of using the Edit Links function, use the Find and Replace function and replace the old file reference with the new file reference.

Related

Why would my Excel 2010 UDF quit working with a #NAME? error?

I have Excel 2010. A couple of months ago I wrote some UDF's and got them debugged and working. Today I changed a value in the spreadsheet, and suddenly all the UDF's displayed #NAME?
Ultimately I decided to start from scratch. I created a new workbook with just one UDF. Here it is, in it's entirety:
Function say7() As Integer
say7 = 7
End Function
I then went to Sheet1 and in box A1 entered "=say7()". I got "#NAME?".
If I type "sa", the dropdown shows "say7". I can press tab or enter and it fills in the function name. And then it says #NAME?.
I understand that Excel 2010 is no longer supported. Did Microsoft do something to break UDFs?
My XLSM was working a few weeks ago. Indeed, the file where I made the change was a copy of the original spreadsheet. I went back to the original, changed a value in one cell that should have forced a recalculation, and it said #NAME?. I didn't change the code, I didn't change any settings, nothing. The only thing I changed was one data value and somehow that makes the function name not be recognized anymore.
Update: Several posters have pointed out that "say7" is not a legal name for a function in Excel and that using this name would produce a #REF? error. True. But my problem was that I was getting a #NAME? error, not a #REF? error. In my attempt to create a simplified scenario -- to make sure that the problem wasn't some error within the function -- I created a new, deliberately very simple function that got the same #NAME? error. Yes, I gave this function an illegal name, which muddles my question. I apologize for the confusion. Explaining why say7 is an invalid name is interesting and useful information, but sadly does not solve my original problem.
When you are writing the function then there are conventional rules of naming it. One of them says
You should not use any names that are identical to the functions, statements, and methods in Visual Basic because you may shadow the same keywords in the language.
The name Say7 while it looks innocuous enough, clashes with a column numbered 12895 which is named as SAY. So in principle, below works for me but I do not have Excel 2010 to see and confirm.
Public Function SaySeven() As Integer
SaySeven = 7
End Function
Edit:
After reading OP's own answer post and other details over, I can think of one more situation where we may encounter #NAME error. This can be reproduced fairly easily.
Step 1: Create a UDF and save the workbook. When you do so, it should not be saved at Excel's trusted locations and the file shall not be identified as trusted. If it is trusted then Excel doesn't prompt for enabling active content. At the point of creation, Excel will produce results without any error. Now close the workbook.
Step 2: Reopen this workbook. You will be prompted with below message.
Ignore this message i.e. do not press "Enable Content" button. OP may have missed this message somewhere.
Step 3: If the UDF was implemented in the previous session and it has returned a valid result then it will not return any error upon recalculation. However, if you enter this UDF in a new cell then Excel will return #NAME error. In below snapshot, both green cell and yellow cell contain exactly the same formula i.e.
=dist3()
But the outcome differs.
So in conclusion: UDF name dist3 is valid and it should work as cited by OP in his later postings. However, in above specific case, one may encounter error of this kind. It will, however, apply to all UDFs and not just dist3.
I have tested this in Excel's Office 365 version but I don't think there will be any major differences in this behavior across versions.
I eventually partly figured it out. At least enough to get it working.
Excel normally blocks you from running UDF's unless you explicitly give it permission. When you try to use the first UDF it pops up a question at the top of the window asking for permission, and if you don't give it, then UDFs aren't recognized and you get #NAME? errors for them.
Apparently -- and this is the part I'm not sure about -- the message telling me that support for Excel 2010 had expired was displayed on top of this message so I couldn't see it. Or something like that. I copied the file to another computer that had a newer version of Excel and I got the message. I clicked OK and the UDFs worked. I then saved it and copied it back to the original computer and it worked fine.
As I had previously clicked Ok on this and this answer is apparently saved with the file, I'm not sure why it asked again. Maybe some changes to the file invalidate the previous answer? I'm not sure.
I created a new file and saw the message about "UDFs ok?" on that one. So maybe my theory that the message was covered by the expiration notice is not correct. I guess it's possible that the message was there all along and I was just blind and didn't see it. That seems unlikely as I was searching for some explanation, but, etc.
In my first version of this post I said that the function name "say7" worked. This was incorrect. When I got the spreadsheet to work I had gone back to my original spreadsheet, where the function that was referenced in the spreadsheet was called "dist3", which works. (There were other functions but they wee all called from within dist3.)
In any case, before I created "say7" I was trying to get it to work with a function called "dist3" and that was also failing with the #NAME?. And as I said in the question, it worked a month ago and I didn't change any function names, so I knew that an illegal function name was not the issue. My attempt to create a simple function to test the problem was a wrong turn because I used an illegal function name that created different problems.
Seeing the logic of #shrivallbha redij's reply I changed the function's name to SAYG (with the idea that G defines the 7th column) and still got a #NAME error. However this can be avoided by passing an argument in the function call, even if the argument isn't used by the function or if it's blank.
=SAYG - returns an error
=SAYG(A1) - returns 7
=SAYG() - returns 7

Excel: Unable to break a link to an external file

I have an excel workbook with links to external Excel-Add-In-files. Recently I migrated the files from old Excel 2003 to current Excel versions. The Workbook now is a .xml-file and the Excel-Add-In file is now a .xlam-file.
After changing the references in VBA and saving all files in the new format, I have a link left that still points to the old .xla-File.
I searched all vba codes, all worksheet-formulas and all name-references for any occurence of the old .xla-file without success.
I could neither update the link nor break the link. Any suggestions welcome! Thank You
After a while, I extracted the .xlsm-file-structure to a directory and searched the xml-contents for the old addin-filename. I found conditional formatting that used a formula and was not updated to the new .xlam-file but still referred to the old .xla-file.
So Excel does not update all links to a file: formulas in conditional formatting are not updated.
The solution was to change the formulas of the conditional formatting and the missing reference problem was gone.
So I think, this is more an exotic problem, as conitional formatting with formulas is not very common and a formula containing a function to an external file isn't either.

Excel: IF statement referencing other file

I am having a #NAME? error in excel with the following formula
=IF([DOP_data_EN.xls]Feuil1!P2="Yes";"Oui";"Non")
Basically, what I am trying to achieve is this:
cells in this row in the original file have 2 values, either Yes or No, and
I need the formula to translate it to French automatically, in another file (I cannot just work in another sheet).
Would anyone have any guidance regarding this?
Thanks in advance,
Antoine
#NAME? error appears if there is a typo. Try to check everything: eg. are you sure the file has .xls extension, not .xlsx ?

Dynamic Link (excel)

I need to reference external sheet via an index, match, match functionality. The problem is that the external file path is dynamic. I tried to build a search using the indirect function; however, as you all know it only works when the source file is open. I then tried to build using hyperlink function and reference it in my index, match. It is not working. Can someone please help?
HYPERLINK("'["&Ref1&"]"&Ref2&"'!"&Ref3)
generates result
"'[Ref1]Ref2'!Ref3"
I think my problem is quotes. Is there a workaround?

Indirect not working

I want to reference an external workbook that is open. If I type =path\[file] directly into the cell (even though I am still asked to 'Update Values',) I am able to get the data I require. However, I am using INDIRECT because the name of the file changes everyday (date). So, I am using CONCATENATE to create a filename daily and then using INDIRECT to the cell where the concatenated formulas is. If you paste values to see what is being generated formula, it is exactly the same formula as above, =path\[file]. However, I continue to only get #REF! error.
I read through this, https://support.office.com/en-us/article/control-when-external-references-links-are-updated-87861952-ca9d-4d2a-a986-4d672c908d0d, and I still can not figure it out. I had it working on my computer at home last night but today and work it is giving me trouble.
To clarify, the formula that I am trying to get to work looks like this =INDIRECT("'"&CONCATENATE($F$129,$F$130,F95)) which worked yesterday at home. Can someone lead me in the right direction?
EDIT:
I have tried two options, =INDIRECT(F121) and =INDIRECT("'"&F121). The contents of F121 have been =CONCATENATE("'",F191,F192,F157) and =CONCATENATE(F191,F192,F157), respectively. I have also tried =CONCATENATE("'",F191,F192,F157) in the destination cell. F191 = [Liquidity Risk Dashboard v2.03 -, F192 = =TEXT(E3,"yyyymmdd")&"]", and F157 = Calculations'!D122. If I write ='[BMI Liquidity Risk Dashboard v2.03 - 20170105]Calculations'!D122 am asked to update values but, 100% have both workbooks upon in same instance
If I understand what you really have in your cells, the problem is that you are not properly naming the source workbook.
Try changing
F192: =TEXT(E3,"yyyymmdd")&".xlsb]"
Replace .xlsb with whatever the file extension really is for your file. (eg: .xlsx, .xlsm, .xls)

Resources