Forum Discussion
Chan_Tze_Leong
May 11, 2021Brass Contributor
Link part of file name to Excel cell
I would like to link part of the filename to part of a cell. The name of the Excel file is Excel Mar Sample. The string in an Excel cell is "MTD Mar CY2021". I would like to like the Mar in the filen...
Chan_Tze_Leong
May 17, 2021Brass Contributor
Dear Hans, When I save the filename say to Apr, the output still shows Mar.
HansVogelaar
May 17, 2021MVP
Unfortunately, that formula isn't updated automatically, you have to do that manually.
Here is another version. It uses a helper cell.
This time it is an ordinary workbook (not macro-enabled).
- Chan_Tze_LeongMay 17, 2021Brass Contributor
HansVogelaar Even though I saved as Apr, the link could not be updated.
- JMB17May 18, 2021Bronze ContributorExcel recalculates prior to saving the workbook, not immediately after (if it did, and something changed, then it would prompt the user to save it again before closing because it changed since the last save operation and could create a confusing cycle for the user). But, it will update when next excel calculates (if you save the workbook, then enter a value in any cell you will see it update). Also, it should update when the file is closed/reopened.
- SergeiBaklanMay 18, 2021Diamond Contributor
Excel in Teams is actually Excel for web. It doesn't support VBA and GET.DOCUMENT function, as well as cell("filename"). Moreover, link on the current file, if check it in File->Info, starts from "https://...".
So far I don't know the way to receive the filename in Excel Online, if maybe with Office Scripts.
- HansVogelaarMay 18, 2021MVP
I cannot explain that, sorry.
And I don't know anything about SharePoint, so I cannot help you with that.
- Chan_Tze_LeongMay 17, 2021Brass ContributorThis will basically reside is Sharepoint/MS Teams. Can it still run?