Excel Formula referring to Another excel in SharePoint's Document Library - excel

We have formula in xls file as below
='SharePoint_FilePath/[ExcelFileName.xls]SheetName'!$B$4
For e.g.
='http://SharePointServer/Sites/SiteName/Shared Documents/[ExcelFileName.xls]SheetName'!$B$4
Once we download this file containing above formula, then it automatically appends local path to formula i.e. New formula will be:
='Download_Path\http:\SharePointServer\Sites\SiteName\Shared Documents\[ExcelFileName.xls]SheetName'!$B$4
I have tried to search on google, found some hints like as below:
Use UNC path for referring to another xls, instead of web url
path.
Uncheck "Update links on Save" in excel options.
But those are also not working.
Can anyone suggest any recommended way?
Thanks

In my user environment, we asked them to use Map Folder to SharePoint Portal and use consistent drive letter for the mapping.
Despite this, it is not good to do referring like that. It should be all in one Excel file. Links like this is easily broken (e.g. change of file name or moving to another folder) and very hard to maintain.
Should avoid doing that.

Related

how do I get the link name from Excel or VBA

I'd like to have my spreadsheet behave differently depending on how I call it.
From file explorer I can double click on either "UHF-test.xlsm" or its shortcut, "VHF-test.lnk". From VBA or an Excel formula, how do I determine which one was used?
If I can't determine the link name, is there another way to pass information in the command line, something like this BAT file
start "\B" EXCEL \\qcy-win10-it-2\TDS-repository\TDS-UAXTED.xlsm -VHF
The BAT file solution works fairly well, it's a very small file where I can embed some options for running macros. A small downside is that the Excel PATH is not normally in the system execution PATH and needs to be added.
The goal is toI write and maintain one only macro-enabled spreadsheet stored in a network location but with the ability to allow multiple users to use it with different products and parameters without being prompted by a macro on startup.
I still prefer determining the shortcut name if someone has that solution.

Excel Hyperlinks to Excel documents not working

We have a excel document that contains a ton of Hyperlinks to other Excel Documents & File Paths all located on our network. All of a sudden the Hyperlinks to the Excel Documents have broken, Excel will state the error below;
Some files can contain viruses or otherwise be harmful to your computer. It is important to be certain that this file is from a trustworthy source.
Would you like to open this file? OK/Cancel
We click OK and nothing will happen. Opening file paths is still working fine and I've created another Excel document which has links to a PDF, a File Path, a Word Doc & an Excel Doc. Still only the Excel that isn't working.
I have followed several articles online that suggest how to disable the warning message,below is a well detailed article for 2007/2010 but we had tried to adapt it for 2013/6. Nothing I have tried is working, does anyone on Stack have any suggestions?
https://support.microsoft.com/en-gb/help/925757/how-to-enable-or-disable-hyperlink-warning-messages-in-2007-office-pro
We are using Office 2013/6 Standard/Professional.
Any help would be greatly appreciated!!
Many thanks,
Sean
This happens when you copy the excel file to different location:
You can do test: place hyperlink into 1 cell save it, and then copy the file to another location: you can see that hyperlink of your copied excel file would not work.
However when you choose the same file to "Save As": the hyperlink of the saved file in different location will work.
For excel internal hyperlinks (hyperlinks to other worksheet cells) similar thing happens when you rename the file: hyperlinks won't work, but they will work if you choose to "Save As".
This means, the solution to this problem would be: copy the excel file to it's original location and name it with the original name (when hyperlinks were working). In this case hyperlinks will work. Then if you need to move or rename the file: open the file from original location and select "Save AS" anywhere you would like to save, in this case hyperlinks of your saved file would work.
Conclusion: relative references to the Excel file in hyperlinks are not automatically updated when externally file is moved or renamed.
So we managed to find out what was the cause of this problem.
Microsoft are currently working on fixing this as stated in the article below, but as a quick fix you simply need to remove Windows Update KB4011051.
https://support.office.com/en-gb/article/Hyperlinks-to-another-Excel-workbook-no-longer-work-after-updating-to-the-August-1-2017-update-KB-4011051-dfe0aa5c-a2ba-41b8-923a-fe0e4556f936
Thanks for the assistance,
Sean

Find Missing External Links in Excel

My spreadsheet has external links that I cannot find. It pops up the "workbook contains links to other data sources" warning upon opening. I don't want to just suppress the link warning, I need to remove the links.
I've tried all the basic ways to find external links that I'm aware of, and it's still happening. I've tried:
Searching for "[" in formulas in the entire workbook
Charts
Checking the named ranges from the Formulas/Name Manager menu
Checking objects
Conditional formatting menus
Is there another way to find external links? Thanks.
It can come from several sources. In my case, it came from the formula of a rule in the conditionnnal formatting. And no Excel search tool could find it.
In the case of an xlsx file, you can find it with an automatical approach:
In the Data tab, click on Edit links. All your links should be displayed. Mark down the values of the Location fields.
Unzip the xlsx file. Technically, an xlsx file is a zip container. See this post for more information.
Now search the whole directory for the Location strings.
Figure out to what your links are related. In my case, it was inside a x14:conditionalFormatting xml node. No wonder the Search tool did not work, it was not in a cell.
Modify that formula
Game over.
I would check the names collection in your workbook.
If you have a named range, for example, that has links to another workbook this will do this also... You can examine these in Excels Name Manager, or some VBA code executed in the debug window...like:
for i = 1 to names.Count: debug.Print Names(i): Next
I had an Excel 2013 file that whenever opened displayed a message regarding a missing external link. I could not find such a link (and location in file) using many suggestions and tools (Kutools, FormulaDEsk etc.).
Finally, I changed the file from xlsx to zip, opned and searched and deleted the gokder relating ton External Links (and changed back). Problem solved!

Referencing and VBA applications

I have a simple question concerning references in excel formulas and VBA.
I am currently taking a course in asset pricing with applications in VBA. As I am very new to VBA, I have become very frustrated about a certain problem concerning solution sheets from my lecturer with reference to directories on his computer.
In the course we're gradually expanding a set pricing library called analytics.xlsm and as I understand this is a macro-enabled workbook. Within the project, there is a module containing pricing functions.
So, when I download my lecturer solution sheets all of the formulas containing pricing functions are referenced to a directory on his computer. As I understand, this is a 'link'. When I open the workbook, I have the option to change the link to my own analytics.xlsm.
I have tried this, among other things, but all I get is the #NAME? value in every cell referenced from or containing a function from analytics.xlsm.
I've tried the following in different orders and combinations:
Enabling/disabling the analytics add-in;
Updating the Reference under the Tools menu in the VBA interface to analytics.xlsm;
Updating my lecturers link with the directory on my computer containing the pricing module.
I hope that someone in here can help me understand how this works. Ideally, I would just want to download his solution workbook with formulas containing only the function written in the pricing module in which case I could just load analytics.xlsm as an add-in. This works when I solve the assignments myself.
Example:
I want
=swaprate(..,..,.....)
instead of
='machintosh......analytics.xlsm!swaprate(..,..,.....)
I'm using excel for MAC and so is my lecturer. Thank you in advance!
The reason why this happens is that the add-in file containing the function swaprate() is local. In other words:
Your lecturer opens the file analytics.xlsm with his Excel; his Excel is using an add-in, let's call it functions.xlam, and this file is stored on his local machine: for example, C:\Lectures\Financials\functions.xlam
Your lecturer inserts the external function in a cell of the analytics.xlsm, for example he writes in A1 the function =swaprate(1,2,3).
Then he uploads the file on the web to let you download it. When this happens, add-ins are lost so the file analytics.xlsm (which contains the function swaprate() referencing to his local add-in) gets the originary source path 'C:\Lectures\Financials\functions.xlam' before the name of the function.
So, technically (to test), the solution to update the link should be:
After downloading the file with the now broken links, go to "Data", then "Edit Links" and update the source of the link to where your local add-in lies;
Hence, you will now have the result as wished. Please note that if you're still seeing your local path before the function name (e.g. 'C:\Student\functions.xlam!'swaprate()) it means that this particular add-in (lying on C:\Student\) is not active. You can activate it by Options/Add-Ins menu of Excel.

Opening Insert Hyperlink in Excel 2010 in a Specific Folder

We're having a problem with the Insert Hyperlink problem taking forever to populate because of a ton of files in a network folder (Windows 7, xp was fine... oh the good old days. And yes, I've tried everything, disabling search, different reg entries, etc... and I'd like a different and less hacky solution.)
What I'm looking for is a macro that prompts for a number (in this case a client file number), and then opens the Insert Hyperlink dialogue inside a specific folder (for example, the file number the user enters might be 4321, and then the insert hyperlink dialogue would be opened inside the folder z:\clients\4321\ It's the z:\clients folder that has a stupid number of folders in it)
The actual file that would be hyperlinked would be somewhere inside there, so additional browsing would have to be done by the user. And I'm not sure exactly how the macro would behave in so far as knowing what to hyperlink (presumably the current cell would make sense to me).
Thanks for any help you can provide!
... You may have to play around with it a bit, but your best bet is probably to set the Hyperlink Base for each user's sheet and then set relative hyperlinks in the sheet itself.
Hope this helps...

Resources