动态超链接可vlookup可vlookup一个单元格值,并找到从数组到输入到URL的相应ID
在这种情况下,我想vlookup vookup value,并将其与列r:r中的ID匹配。 Q列:Q是可以找到单元格的地方。
单元格值可用并提取信息。我不能把它带到vlookup。
Public Sub Login_To_Hyperlink()
Dim VBAIDPull As Range
Dim Cell As Range
Dim ID As String
Set VBAIDPull = Workbooks("testupdated.xlsm").Sheets("Overview").Range("Q2:Q250,R2:R250")
ID = Application.WorksheetFunction.VLookup(Cell.Value, VBAIDPull, 2, False)
For Each Cell In Range("A2:A250")
If Cell <> "" Then
ActiveSheet.Hyperlinks.Add Anchor:=Cell, _
Address:=Cell.Value, _
ScreenTip:=ID, _
TextToDisplay:=Cell.Value
End If
Next
End Sub
I want to VLOOKUP the cell.value in this case and match it to the ID in column R:R. Column Q:Q is where the cell.value can be found.
The cell.value works and pulls the info. I can't get it to vlookup.
Public Sub Login_To_Hyperlink()
Dim VBAIDPull As Range
Dim Cell As Range
Dim ID As String
Set VBAIDPull = Workbooks("testupdated.xlsm").Sheets("Overview").Range("Q2:Q250,R2:R250")
ID = Application.WorksheetFunction.VLookup(Cell.Value, VBAIDPull, 2, False)
For Each Cell In Range("A2:A250")
If Cell <> "" Then
ActiveSheet.Hyperlinks.Add Anchor:=Cell, _
Address:=Cell.Value, _
ScreenTip:=ID, _
TextToDisplay:=Cell.Value
End If
Next
End Sub
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这可能是您想要的:
This might be close what you want: