Navigation

1/17/2014

Create hyperlinks in Excel

To create hyperlinks in an Excel column, use the macro below:


Public Sub Convert_To_Hyperlinks()
Dim Cell As Range
For Each Cell In Intersect(Selection, ActiveSheet.UsedRange)
If Cell <> "" Then
ActiveSheet.Hyperlinks.Add Cell, Cell.Value
End If
Next
End Sub

Creating the Macro

  • Open your Excel doc
  • Open the macro editor by pressing ALT+F11.
  • In the Tools Menu, left-click View and select Project Explorer.
  • Look for the folder called ‘Modules’, right-click it, select ‘Insert’, then select ‘Module’.
  • Paste the code into the project module you have selected.
  • Press ALT+F11 to return to your Excel workbook (or click on its icon in the Windows taskbar).

Run the Macro

  • To execute the macro, select the unclickable text links you want to convert to clickable hyperlinks.
  • Press ALT+F8 to open the Macro selector window and click on the macro you just created.
  • Your Links are now all Clickable! Saving you time and data entry fatigue :)

Note:  must save this as extension XLSM, because it has macro (xlsx is non macro enabled spreadsheet)

From:  http://www.niallflynn.com/random-news/convert-urls-to-clickable-links-in-excel/

No comments:

Post a Comment