I have a workbook created with Excel .xlsx (Windows PC) that contains two sheets, S1 and S2.
In S1 there are single cells that are linked to single cells in S2 by using the cell name definition. These cell name definitions are created in S2 and reachable from the whole workbook (max scope).
So, in Excel, I click on a cell in S! to see the corresponding cell in S2. And viceversa. That's working fine.
Now, I put the file .xlsx into the Google Drive so I can reach it from the mobile or from another PC.
With the mobile, I use the Google's app Sheets. From PC I open the workbook using a specific extension of Google Chrome, installed in the browser. Both, mobile and PC, opens the worksheet and I can see the two sheets in it; when I tap (with mobile) or click (using PC) in the cell with link, nothing happens; the link to the another cell doesn't work.
Seems a problem due to the conversion from Excel to Google Sheet. Do you have any suggestions?
While both apps are spreadsheet applications and several features works the same way on both, other several features are exclusive of one or the other application. i.e. Google Sheets has IMPORTRANGE built-in function but Excel doesn't.
AFAIK Open Document scope is only about how data is saved in order to make it able of being opened by supporting applications but there isn't a standard for the way that applications works.
Related
I'm trying to set up a shared workbook that will collect data from other workbooks onto one sheet. All the files are in the same folder on OneDrive and need to be used by multiple people.
I started by just making a test workbook and opened one of the other workbooks in the same directory as well. Then in the test workbook in one cell I put = and then clicked on a cell from the other workbook and hit enter. This brought through the data from that cell into the test workbook. When I closed the file it converted it into a web address for the file and kept the data. eg:
='http://ourprojects.sharepoint.com/sites/TeamName/FolderName/[Project Name.xlsx]Sheet1'!$A$1
So far so good.
Now the issue is in the main file I need to pull that data from multiple files in the directory that will change as and when projects start/end so I need to build up the formula in parts. So the main web address stays the same, for example "http://ourprojects.sharepoint.com/sites/TeamName/FolderName/" the rest I need to build up depending on what the user fills in.
So ideally I want the user to put in the project name (which will be the same as the workbook name) and the cell they need the data from. Meaning I have 4 things I want to combine:
A1 is Web address = http://ourprojects.sharepoint.com/sites/TeamName/FolderName/
B1 is Workbook Name = Project One
C1 is Sheet Name = Sheet1
D1 is Cell needed = A1
and then in a 5th cell, E1, these are combined to make the filepath to bring in the data:
='http://ourprojects.sharepoint.com/sites/TeamName/FolderName/[Project One.xlsx]Sheet1'!$A$1
I can't for the life of me get this working. I've googled a fair bit and found lots of different answers/solutions from all over including this site but non have worked.
If anyone can help me it would be appreciated.
I did get something kind of working with indirect but obviously that only works with the file open which kind of defeats the aim of this totally. I want this new file to just pull the data in so it gives an overview of everything without having to open them all one by one.
The problem
I have eight Excel documents that are stored on a Sharepoint site. One of those documents (“receiving file”) contains formulas/cell references to the other seven documents (“source files”) on Sharepoint.
Everything works when the references are created.
Once the workbooks are saved and closed and then reopened, the receiving file no longer updates the values from the source files.
The files are synced in Windows Explorer and opened in the desktop version of Excel. Also, all eight files are opened at the same time.
The reference will first look something like this
='[Source file.xlsx]Sheet1'!$A$1
After closing and reopening, the references will look like this
='https://somecompanyname.sharepoint.com/sites/SitefortestingExcelreferences/Shared Documents/[Source file.xlsx]Sheet1'!$A$1
If I now change a value in the source value, the change will not appear in the receiving file.
What I tried so far
Setting “Calculation” to “Automatic.
Click “Calculate Now” and “Calculate Sheet”.
Double-click into the cell with the reference and hit enter.
In “Data > Queries & Connections” click “Refresh all”
In “Data > Queries & Connections > Edit Link” I clicked on update values. It did not help. However, I tried to rebuild a simple system with just two files and a single reference, and here it did work
Starting from point 5) I programmed a little macro that updates all links in all open workbooks (it did not help either):
Option Explicit
Sub UpdateAllConnections()
Dim wbWorkbook As Workbook
For Each wbWorkbook In Application.Workbooks
wbWorkbook.UpdateLink Name:=wbWorkbook.LinkSources, Type:=xlExcelLinks
Next wbWorkbook
MsgBox "Update complete.", vbInformation, "Complete"
End Sub
If I remove the path to SharePoint, so the formula looks like this
='[Source file.xlsx]Sheet1'!$A$1
It works again (until I save and reopen).
I found the following on Microsoft Answers (about OneDrive but it's probably the same issue):
https://answers.microsoft.com/en-us/msoffice/forum/all/excel-value-links-not-updating-on-onedrive/e48a7680-71e6-4a77-9eb1-e03ec7f0e3e0
I contacted the official O365 support desk and they told me this is built into the connection between Excel and OneDrive.
They have received thousands of complaints and there is no fix for it.
No option to tell Excel/Office/OneDrive to link to local copies of files on 1D by default.
No fix is planned as this is not how MS envisions how Excel/1D should be used.
My question
Any suggestions? Are there any tools in Excel that can be used to update the linked cells automatically or manually? Might SharePoint settings prevent the update?
If not, since removing the file path to SharePoint seems to work is there a way (using VBA) to remove the full file path from all cell references, so
='https://somecompanyname.sharepoint.com/sites/SitefortestingExcelreferences/Shared Documents/[Source file.xlsx]Sheet1'!$A$1
becomes
='[Source file.xlsx]Sheet1'!$A$1
I could probably loop through all cells and simply replace the path with nothing, but that would only work if I know the file path beforehand and if all the files are stored in the same SharePoint folder.
I had the same issue and here is my workaround: I can open the source file on the Sharepoint site by clicking ... and then Open in App (as opposed to Open in Browser) The referecence cell in the receiving file will become ='[Source file.xlsx]Sheet1'!$A$1 again and get automatically updated.
My workaround would be to consolidate external links onto a single sheet, and manually or use a macro to copy / hard paste to another identical page that you use for the links.
Just run the macro when you have the workbook open on your desktop to update the values.
Even simpler, you could also have a sort of database with linked values in a column and hard copies pasted into another column. This would be simpler than two identically sized sheets.
BUT, you could also go crazy and have named ranges like quarterly_total_formula and an analogue somewhere else called quarterly_total_valueonly and then write a macro to iterate over each with a for each looking for things "LIKE" *_formula and hard paste each result into the complementary *_valueonly spot... but then you'd need a macro to check that they were all paired... and by that point you might as well not waste your time in Excel and develop in Power BI, Tableau, RMarkdown, or heck learn Adobe Illustrator or work directly in HTML.
Firstly, I realise this problem could be solved with VBA, but I am looking to keep this workbook macro-free.
What I am trying to do is have several Excel workbooks embedded into my workbook (each embedded workbook is specific to a factory). I want to create a cell that acts as a dynamic hyperlink, which changes depending on which factory is filtered (I don't have any issues creating this dynamic hyperlink myself). The part I don't know how to do, is create a hyperlink that opens a document that is embedded within the workbook. I can make a hyperlink that opens a file saved in a directory, but I need to be able to share this workbook with multiple users, therefore I am embedding the documents.
Hopefully this makes sense - to summarise; I need to create a button/hyperlink that opens an embedded document WITHOUT VBA.
Many thanks
You have an EXCEL function HYPERLINK that receives a string (i.e. URL) as the first parameter. You can of course set BUILD the URL with a formula or a reference to other cell.
For instance, if you set in a cell the value:
=HYPERLINK("http://www.google.com")
and link on it, Google's page will be open on your browser. If you set the link to point to a file (any file) it will open it with the suitable application (e.g. Excel).
Is this what you were looking for?
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.
I wrote an Excel add-in that provides UDFs (user-defined worksheet functions).
All is well until one user sends his workbook using those functions to another user, or just tries to use the workbook on more than one computer, where the add-in has been installed to different paths.
Even if the only difference in the paths is the drive letter, when the workbook is opened on the other computer, the old full path appears on the formulas in front of all the UDFs, and the formulas return an error.
One way of dealing with that is doing a search & replace of all formulas in the workbook, replacing the path with an empty string. Then the formulas reset themselves for the add-in's path on the current computer. Sometimes I then have to go into the VBE and run a CalculateFullRebuild to get the formulas to work. Though it works, it's a lot to ask of the less technical users, and it's annoying to have to do it frequently for those users who move their workbooks around a lot.
Also -- do COM add-ins have this problem? My add-in is an xla. Though I'm curious about that, it's a moot point in this case since COM add-ins don't work on Macintosh Excel and I need this add-in to work cross-platform.
UPDATE:
As requested, here's a screenshot:
This screenshot shows what happens if Fred, who put the add-in in C:\Fred's Stuff\Fred's Excel Stuff\MyAddin.xla, sends his workbook to Martha, who put the same add-in in another path, such as C:\Martha's Files\Martha's Excel Files\MyAddin.xla, and Martha opens the file Fred sent.
If Martha deletes the path, leaving only "=MyUDF()" in the formula, Excel will find MyAddin.xla on Martha's computer in the path where Martha put it (assuming she had previously installed MyAddin.xla as an add-in in Excel), and resolve the formula correctly.
This is one of the many bugbears Excel developers need to face at one time or another, and there are a few work-arounds for it, but which one you choose will depend on your own circumstances:
http://www.jkp-ads.com/articles/FixLinks2UDF00.asp
In case the link dies, here is a summary of the three suggested methods:
Use fixed locations.
Instead of keeping your UDF code inside the addin, you create a facility that copies the UDF routine into each workbook that uses it.
Redirect the UDFs to the new location.