Power Query can import and transform a URL, but it does not turn that text into a clickable Excel hyperlink by itself. The dependable approach is to load a URL column to Excel, then use Excel’s HYPERLINK function to create clickable links; plan where that formula sits so a query refresh does not overwrite it.
What “Power Query hyperlink” can mean
The phrase usually describes one of two different things: importing a link that already exists in source data, or creating a clickable link from data returned by a query. These are not quite the same task. A URL is text such as https://example.com/products/42. A hyperlink is a link target associated with a cell, often displayed as that URL or as a friendly label such as “View product.”
Power Query is Excel’s tool for connecting to data, shaping it, and loading the result. Its output is primarily values in a table or data model. A text value that happens to look like a web address is still text; Excel does not always make it clickable automatically, especially when the value is loaded as part of a query result. Conversely, a cell may show friendly text while its actual hyperlink target is stored separately from the displayed value.
Keeping this distinction in mind prevents a common dead end: changing a query’s column type or applying a text format does not, on its own, create a hyperlink target.
How Power Query handles link data
When a query returns a URL as a text value, Power Query can filter it, clean it, combine it with other text, and load it to a worksheet. It does not provide a general-purpose M value type that creates an ordinary clickable Excel worksheet hyperlink. In other words, a custom column that outputs a URL is still a column of URL text.
For data coming from an Excel workbook, a further issue can arise. A cell containing visible text such as “Product page” may have a hyperlink address stored as cell-level link metadata, rather than as the cell’s value. A query that reads a table or range generally works with the cell’s value; it should not be relied on to retrieve that separate target. If the source only contains a friendly label and a hyperlink attached to it, arrange for the actual destination URL to be available as a separate field before querying.
Web, CSV, database, and API sources may already provide a URL field. In that case, Power Query can preserve the address as text, subject to the source’s structure and any transformations. If the source provides only a label or an identifier, the query needs a reliable way to obtain the destination before Excel can make a useful link.
Create clickable links in an Excel worksheet
For a standard Excel worksheet, load the query’s URL field and use HYPERLINK in a worksheet cell. In Excel for Microsoft 365 on Windows, load or select the query using the Data tab’s query and connection commands, then use the formula in the worksheet column where you want the clickable result. If the query output is an Excel table with a column headed URL, this structured-reference formula can be entered in a new table column:
With the query-loaded table containing a column named URL, enter this formula in a new column of that table:
=HYPERLINK([@URL],"Open page")
For a row whose URL is https://example.com/products/42, the cell displays “Open page”; selecting it opens that address in the default browser. You can replace the label with a more descriptive value, or omit the friendly label argument if you want the address itself to appear. The link destination must be valid and appropriate to open.
For a plain range rather than an Excel table, the cell reference can be used instead. With the URL in A2, enter this formula in B2:
=HYPERLINK(A2,"Open page")
Copy the formula down for the other rows. A table formula is usually more convenient because Excel can fill it down as rows are added, but the placement of the formula column matters when the query refreshes.
Build or clean a URL in the query
Sometimes the source does not give a complete URL. It might provide a product ID, a web domain, and a path separately. Power Query can combine those parts into a text column, which Excel can then use as the first argument of HYPERLINK. In Excel for Microsoft 365 on Windows, open the query with Data > Queries & Connections, double-click the query, and in Power Query Editor choose Add Column > Custom Column. Use the appropriate text expression for the source fields, and check several results before loading.
For example, a product identifier might be appended to a fixed address pattern such as https://example.com/products/. The query’s role is to produce the complete address as text; the worksheet formula’s role is to turn that address into a clickable cell. This split makes it easier to inspect and reuse the cleaned URL independently of how it is presented.
Check for leading or trailing spaces, missing protocol text such as https://, and characters that need URL encoding. A syntactically plausible string can still lead to a missing page if the source identifier is wrong or the website uses a different path. Do not silently replace missing URLs with a generic address: that can create working-looking links that send users to the wrong place.
Keep hyperlinks dependable after refresh
A query refresh replaces or resizes the data it loads. If you put hand-entered formulas inside the query’s output area, a refresh can overwrite them, remove them, or leave them misaligned when rows change. The precise behavior depends on the workbook layout and how the query is loaded, so test refreshes with representative additions, deletions, and changes in the source.
- Keep the URL in the query result. Treat it as source data and avoid editing query output cells by hand.
- Place hyperlink formulas outside the query’s loaded range when practical, and make sure the formulas still refer to the correct records after refresh.
- Use a stable key such as a product ID to associate link formulas with query rows if the query can reorder or remove records. Row position alone is fragile.
- Refresh-test the workbook. Confirm formulas remain present, point to the intended URL, and cover newly returned rows.
Adding a formula column to the same Excel table can be convenient, but it is not a substitute for checking refresh behavior. If a query refresh changes the table’s size or structure, verify that the calculated column is still filled correctly. For important workbooks, keep a backup and test a copy before changing the query or its load destination.
Common problems and fixes
The URL appears as plain text. That is expected when the query returns a text field. Add a worksheet HYPERLINK formula, or use an Excel feature that explicitly creates a link; formatting the text as a hyperlink-looking color does not add a destination.
The link opens the wrong page or fails. Inspect the actual URL, not just the friendly label. Look for whitespace, truncated values, a missing protocol, incorrect IDs, or characters that the website expects to be encoded. Copy the address from the cell’s formula or inspect the source value to compare it with a known working URL.
The source has a linked label but no visible URL column. The link address may be stored separately from the cell’s displayed text. Ask for an export that includes the destination, or extract the target from the source system using a method that exposes hyperlink metadata. A query cannot reliably reconstruct an unknown target from a label alone.
Only some rows are clickable. Check for blank or invalid URL values, formulas that were not filled down, or a refresh that changed the row set. A formula can also produce an empty-looking result when its input is blank, so test how missing values should be handled in your workflow.
Links work in Excel but not after export. A later CSV export contains text fields, not Excel’s cell-level hyperlink behavior. If users need clickable links in another system, confirm that the destination format supports links and that it receives the actual URL rather than only a display label.
Excel, Power BI, and other ways to present URLs
For an Excel worksheet, HYPERLINK is usually the simplest way to show a friendly clickable label. It also gives you control over the text users see. Power Query remains useful for preparing the underlying URL, particularly when the data needs repeatable cleanup on each refresh.
In Power BI, a URL can be displayed as a web link when the model and visual are configured to treat the field as a web URL. That is a reporting setting rather than an Excel worksheet hyperlink formula, and the exact behavior depends on the visual. In a CSV or database export, a URL is generally just text unless the receiving application interprets it as a link. Choose the presentation method based on where people will use the result, not only on how it looks in the query preview.
Automatic detection by Excel may appear to work for some pasted or typed addresses, but it is less dependable as a repeatable query workflow than explicitly creating the link in the worksheet. If consistent display, refresh behavior, or a custom label matters, use a deliberate formula and verify the result in the destination application.
Frequently Asked Questions
Can Power Query create a clickable hyperlink in Excel?
Power Query can return and transform the URL text, but it does not generally create an ordinary clickable worksheet hyperlink by itself. Load the URL and use Excel’s HYPERLINK function to create the clickable cell.
Why did Power Query import the link text but not its destination?
The source may store the visible cell value and hyperlink target separately. A query reading a worksheet table or range may receive the value, not that separate hyperlink metadata. Include the actual destination in a source column if you need it downstream.
Can I use a friendly name instead of showing the whole URL?
Yes. Use the second argument of HYPERLINK for the display label, for example “Open page.” The formula still needs a valid URL as its first argument.
Will a hyperlink formula survive Power Query refresh?
It can, but do not assume it will. A refresh may resize or replace the loaded result. Keep formulas outside the query output where feasible, use stable keys if rows can move, and test a refresh that changes the row count.
Does this work in Excel for the web or on Mac?HYPERLINK is an Excel worksheet function and can be used in supported Excel versions beyond Windows. The menu locations and query-editing capabilities can differ in Excel for the web and Mac; the steps above describe Excel for Microsoft 365 on Windows, so check the available Data and Power Query commands in your version.
Related
- Calculated Field in a PivotTable: How It Works
- BI Conditional Formatting in Power BI: Rules and Uses
- Conditional Formatting to Highlight Blank Cells
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- How to Split Text Into Columns in Google Sheets EasilyTo split text in Google Sheets, select the cells, choose Data > Split text to columns, then pick…
- How to Make a Poster in Word or PowerPoint That Prints WellTo make a poster in Word or PowerPoint, set the page or slide to the finished poster size…
- Google Sheets Dropdowns From Named Ranges: How to Set UpYes. In Google Sheets, create a named range for your list, then use that name as the source…
- How to Insert a Divider Line in Word: 3 Easy MethodsTo insert a quick divider in Word, type three hyphens (—) on a blank line and press Enter;…
- Project Tracker Spreadsheet in Google Sheets: Setup GuideYes. You can make a project tracker spreadsheet in Google Sheets by creating a sheet with one row…
- How to Remove Subtotals From Google Sheets VLOOKUPGoogle Sheets VLOOKUP does not create subtotals, so remove them from its lookup results by excluding subtotal rows…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.