我需要根据该单元格的内容将超链接插入整个列。
Range("A2").Select
Range(Selection, Selection.End(xlDown)).Select
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:= _
"http://FILE LOCATION/" & "A2"
所以如果A2包含0106-15-9562,我需要它来超链接
"http://FILE LOCATION/0106-15-9562"
......等等整个专栏。
答案 0 :(得分:1)
一种方式:
Dim cell As Range
For Each cell In Range(Range("A2"), Range("A2").End(xlDown))
ActiveSheet.Hyperlinks.Add cell, "http://example.com/" & cell.Value
Next