Page tree

Welcome to FreeSoftwareServers Confluence Wiki

Skip to end of metadata
Go to start of metadata
Public Sub RangeToHyperlinks(ColNum As Integer, URL As String)
Dim rcell As Range, rng As Range

lRow = Get_lRow(ActiveSheet)
Set rng = Range(Cells(2, ColNum), Cells(lRow, ColNum))

For Each rcell In rng.Cells
 If Not IsError(rcell.Value) Then
  If rcell.Value <> "" Then
   If rcell.Hyperlinks.Count = 0 Then
    ActiveSheet.Hyperlinks.Add rcell, URL & rcell.Value
   End If
  End If
 End If
Next rcell
End Sub
  • No labels