超链接到工作表,其名称与单元格值相同 [英] Hyperlink to worksheet with name same as cell value

查看:558
本文介绍了超链接到工作表,其名称与单元格值相同的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我的"章节"中有大约250个名字的索引。工作表,我为其创建了一个单独的工作表。我已经手动将每个名称超链接到各自的工作表,但这非常耗时。有没有办法自动将每个单元格/名称与其相应的工作表(具有相同的名称)链接?

谢谢!

Hi all,

I have an index of ~250 names on my "chapters" worksheet, each of which I have created a separate worksheet for.  I have been manually hyperlinking each of the names to their respective worksheet, but it has been very time consuming.  Is there a way to automatically link each cell/name with its respective worksheet (with the same name)?

Thanks!

推荐答案

给试一试...第二组作为范围
作为字符串的星期几

用于每个cl in范围("A1:A250")
nS = cl.Value
cl.Hyperlinks.Add Anchor:= cl,Address:="",SubAddress:= nS& "!A1",TextToDisplay:= nS
下一个
将范围A1:A250更改为包含"250个名称"的范围br />
b $ b
Give it a try...



Dim cl As Range
Dim nS As String


For Each cl In Range("A1:A250")
    nS = cl.Value
    cl.Hyperlinks.Add Anchor:=cl, Address:="", SubAddress:=nS & "!A1", TextToDisplay:=nS
Next


Change the range A1:A250 to be the range that contains your "250 names"



Dim cl As Range
Dim nS As String


For Each cl In Range("A1:A250")
    nS = cl.Value
    cl.Hyperlinks.Add Anchor:=cl, Address:="", SubAddress:=nS & "!A1", TextToDisplay:=nS
Next





这篇关于超链接到工作表,其名称与单元格值相同的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆