1

This is a fairly simple question but I am unable to find any relevant documentation for it.

Having created a power query in Excel how can I alter the date in the url string from user input on the worksheet without having to re-open the Power Query Editor/Advanced Editor.

so for instance in the Advanced Editor window I have something like:

Source = Web.BrowserContents("https://www.bbc.co.uk/sport/football/scores-fixtures/2025-10-04")

I want to be able to update the date to 2025-10-05 or whatever just with user input in Excel, not amending a parameter query.

I'm guessing I could do this by referring to a named range in conjunction with the url string but cannot find the syntax for this.

1 Answer 1

1

For anyone interested I discovered the solution is to create another blank query referring a named range in the worksheet which contains the date.

= Excel.CurrentWorkbook(){[Name="FixDate"]}[Content]{0}[Column1]

Needing to specify the [Content] as {0}[Column1] otherwise the query output will be read as a table not as text that can be concatenated with the url string. I also needed to make sure the named range in the worksheet is formatted as text.

Call this query "Parameter_FixDate".

And in the original web query through Advanced Editor:

Source = Web.BrowserContents("https://www.bbc.co.uk/sport/football/scores-fixtures/"&Parameter_FixDate),

Having done this I got a firewall error, resolved through Power Query/File/Options and settings/Query Options/Privacy

set to: Always ignore Privacy level settings

After this I can just amend the date in the worksheet and refresh the query.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.