Function Problems

Create a Date-Based External Workbook Link in Excel Online

Natalie TaylorNatalie Taylor Dec 2, 2026 868 views

Question details

Use the date in cell A4 to select an external workbook whose filename contains that date and retrieve a value from it.

Create a Date-Based External Workbook Link in Excel Online
Product
Excel Online
Device & OS
not provided
Scenario
The user needs a SharePoint workbook link to change when the date in A4 changes.
Observed behavior
An existing external link retrieves data, but the workbook filename must currently be specified rather than generated from A4.
Before you start

Check that A4 contains a valid Excel date and that you can open the source workbook on SharePoint. For the Power Query method, you will need Excel for desktop and permission to access the SharePoint site.

Solution 1Recommended

Select the dated SharePoint workbook with Power Query

Use this method when the workbook filename must change according to A4 and a desktop Power Query setup is available.

Concatenating a date into an external reference creates text; Excel does not automatically evaluate that text as a workbook link. Power Query can instead use the date to find and read the matching file.

The example below loads a one-cell result into a worksheet. The row position assumes the source sheet's Power Query preview starts at worksheet row 1; check the preview and adjust the row index if necessary.

1
Create a date input table

Select A4, choose Insert > Table, and create a one-column table with a header named Date and the date as its only data row. On the Table Design tab, name the table LinkDate.

2
Connect to SharePoint

In Excel for desktop, choose Data > Get Data > From Online Services > From SharePoint Folder. Enter https://myDomain.sharepoint.com/sites/Sheets, sign in, and choose Transform Data.

3
Build the query

In Power Query, open Home > Advanced Editor and replace the query with the following, adjusting the site, folder, filename suffix, and sheet name as needed: let DateValue = Date.From(Excel.CurrentWorkbook(){[Name="LinkDate"]}[Content]{0}[Date]), FileName = Date.ToText(DateValue, [Format="yyyy-MM-dd", Culture="en-US"]) & "-4126 - Sheets.xlsx", Files = SharePoint.Files("https://myDomain.sharepoint.com/sites/Sheets", [ApiVersion=15]), Match = Table.SelectRows(Files, each [Name] = FileName and [Folder Path] = "https://myDomain.sharepoint.com/sites/Sheets/Shared Documents/Driver/"), Workbook = Excel.Workbook(Match{0}[Content], null, true), Sheet = Workbook{[Item="Trip Expenses Sheet", Kind="Sheet"]}[Data], Result = #table({"Value"}, {{Sheet{80}[Column1]}}) in Result

4
Verify and load the value

Check the query preview against cell A81 in the source workbook. Adjust Sheet{80}[Column1] if the preview starts on a different worksheet row, then choose Home > Close & Load.

5
Refresh after changing the date

Change the date in the LinkDate table and select Data > Refresh All to retrieve the matching workbook's value.

Select the dated SharePoint workbook with Power Query
Excel Online refresh: Power Query refresh in Excel Online depends on the connector, credentials, and your organization's settings. If the query cannot refresh in the browser, refresh it in Excel for desktop.
Free Microsoft Office alternative

Work with Excel spreadsheets in WPS Office

WPS Office is a free, lightweight alternative with a familiar spreadsheet interface and Microsoft Office format compatibility, making it easy to move everyday workbook editing to WPS. It does not fix Excel Online's dynamic external-link limitation; check advanced links and queries when migrating.

Edit date-based workbook data in WPS SpreadsheetsOpen and save Microsoft Excel XLSX filesUse a familiar spreadsheet interface for everyday tasksWork with a free, lightweight office suite
microsoft office alternative - wps office

Frequently Asked Questions

Can I build the workbook filename from A4 with a formula?

Yes. For example, =TEXT(A4,"yyyy-mm-dd")&"-4126 - Sheets.xlsx" produces the filename as text. It does not by itself create a live external reference.

Will INDIRECT open the dated SharePoint workbook?

Do not rely on INDIRECT for this scenario. External INDIRECT references require the source workbook to be open in supported desktop Excel configurations and are not a reliable way to fetch a closed SharePoint workbook in Excel Online.

Why does the Power Query result show an error after I change the date?

Check that the LinkDate table contains a valid date and that the formatted filename matches a file in the specified SharePoint folder. Also verify your SharePoint credentials and the source sheet name in Data > Queries & Connections.

Does the query update as soon as I change A4?

Not automatically. After changing the date in the LinkDate table, select Data > Refresh All. Browser refresh availability depends on the query and your organization's settings.