Convert a Column of Web Addresses to Hyperlinks in Excel
Question details
Convert plain-text web addresses in selected Excel cells into clickable hyperlinks.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A worksheet contains a column of web addresses that the user wants to convert in bulk.
- Observed behavior
- The URLs are plain text, and the desired result is a clickable hyperlink in each selected cell.
Make sure the selected cells contain valid web addresses, preferably including https:// or http://. To use the VBA method, open the workbook in a desktop version of Excel that supports macros.
Convert Selected URL Cells with an Excel VBA Macro
Use this macro to create hyperlinks directly in the selected cells without adding another column.
In desktop Excel, press Alt+F11 on Windows or open the Visual Basic editor from the Developer tab.
In the VBA editor, choose Insert > Module and paste this code: Sub Convert2Hyperlinks() Dim cell As Range Application.ScreenUpdating = False For Each cell In Selection ActiveSheet.Hyperlinks.Add Anchor:=cell, Address:=cell.Value Next cell Application.ScreenUpdating = True End Sub
Return to the worksheet and select only the cells containing the web addresses you want to convert.
Open Developer > Macros, select Convert2Hyperlinks, and click Run. Click a converted cell to check its destination.

Create Hyperlinks in a Separate Excel Column
Use a formula when you want clickable links without running a macro.
Create Clickable URL Links in WPS Spreadsheet
Use the HYPERLINK function in WPS Spreadsheet to turn a column of plain-text addresses into clickable links in a separate column.
- 1. Open the workbook: Open WPS Spreadsheet and use Open to select the workbook containing your URL column.
- 2. Enter the link formula: If the first address is in A2, click an empty cell such as B2 and enter =HYPERLINK(A2,A2).
- 3. Fill down: Drag the fill handle from B2 down beside the rest of the URL list.
- 4. Test and save: Click a generated link to check it, then use File > Save to save the workbook.

Frequently Asked Questions
Can I convert the URLs in place without adding a column?
Yes. In desktop Excel, select the URL cells and run the Convert2Hyperlinks VBA macro to add a hyperlink to each selected cell.
Can I run the VBA macro in Excel for the web?
Excel for the web cannot run VBA macros. Open the workbook in desktop Excel to run the macro, or use a HYPERLINK formula in a separate column.
Why does a generated hyperlink not open the expected page?
Check the source cell for a complete, valid address, including https:// or http:// where appropriate. Correct the address and test the link again.
How do I keep the VBA macro in my workbook?
In Excel, choose File > Save As and select Excel Macro-Enabled Workbook (.xlsm). A standard .xlsx file cannot retain VBA code.




