【问题标题】:macro to insert hyperlink using Column value使用列值插入超链接的宏
【发布时间】:2015-09-16 23:52:59
【问题描述】:

我正在尝试创建一个宏,根据 A 列中的值将超链接添加到 A 列。例如:

Column A
1234
2312
4432

我想要超链接如下: "https://fixedstring.com/idno=1234"

其中 1234 是基于该行的单元格值的变量。也是Label。

我想针对所有行的 A 列运行此宏...

【问题讨论】:

    标签: excel hyperlink


    【解决方案1】:

    试一试:

    Sub HyperMaker()
       Dim r As Range
       For Each r In Intersect(Range("A:A"), ActiveSheet.UsedRange)
          v = r.Value
          If v <> "" Then
             r.Clear
             r.Hyperlinks.Add anchor:=r, Address:="https://fixedstring.com/idno=" & v
          End If
       Next r
    End Sub
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-09-22
      • 2019-11-15
      • 2017-08-07
      • 1970-01-01
      • 1970-01-01
      • 2018-05-23
      • 2017-05-03
      相关资源
      最近更新 更多