美文网首页
vba 修改Excel中网址为可点击

vba 修改Excel中网址为可点击

作者: HanssonLiu | 来源:发表于2020-03-13 17:13 被阅读0次
Sub editUrl()

    For Each cell In Range("A2:A" & Cells(Rows.Count, 1).End(xlUp).Row)

        If Left(cell, 8) = "https://" Then

            ActiveSheet.Hyperlinks.Add cell, cell.Value

        End If

    Next

    For Each cell In Range("J2:J" & Cells(Rows.Count, 1).End(xlUp).Row)

        If Left(cell, 8) = "https://" Then

            ActiveSheet.Hyperlinks.Add cell, cell.Value

        End If

    Next

    For Each cell In Range("K2:K" & Cells(Rows.Count, 1).End(xlUp).Row)

        If Left(cell, 8) = "https://" Then

            ActiveSheet.Hyperlinks.Add cell, cell.Value

        End If

    Next

End Sub

相关文章

网友评论

      本文标题:vba 修改Excel中网址为可点击

      本文链接:https://www.haomeiwen.com/subject/sdcjshtx.html