如果值相同,则自动链接到另一个工作表中的单元格 [英] Automatically link to a cell in another sheet if value is the same

查看:309
本文介绍了如果值相同,则自动链接到另一个工作表中的单元格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个状态更新表(sheet1),其中小组成员每个动作都有一行,每个动作都有一个参考号(s1,columnA)。





在另一张表(sheet2)中,我有团队负责人编写自己的状态更新,但可能不一定引用每个参考号,也不会按照与sheet1相同的顺序进行操作。





基本上,我正在寻找的是sheet1中的列,以自动显示链接如果columnA中的参考号也在sheet2的sheetB中找到。



这可能吗?如果是这样,我该怎么办?我希望使用一个公式,但我不知道是否可以。希望使用VBA作为最后的手段,因为这将是一个共享的电子表格,有可能搞砸的概率是体面的。



谢谢,如果我应该澄清一下,请让我知道。

解决方案

您正在寻找的是一个动态超链接。



所以,我们假设你有 Sheet1 所有的




  • 团队成员与(列 B

  • 团队领导和(列 A

  • 参考/项目编号(列 C )。



Sheet2 中,我们有一个表,其中包含各种信息,列 E 中的相同引用/项目编号。



然后,您可以在 Sheet1

上的表中添加一个新列 D code>你可能想要命名链接,这里的公式应该是:

  = HYPERLINK(#Sheet2!E& MATCH(D2,Sheet2!E:E,0),Link to&D2)
/ pre>

如果您正在使用可以使用命名列的表:

  = HYPERLINK(#Sheet2!E& MATCH([@ [参考号]] ,Sheet2!E:E,0),链接到&[@ [参考号]])

当然,您可以将替代文字调整为更合适。



也许以下图片有帮助解释以上内容:




I have a status update sheet (sheet1) in which team members have a line per action, and each action has a reference number (s1, columnA).

In another sheet (sheet2), I have the team leads write their own status updates, but they may not necessarily reference every single reference number, nor will they do it in the same order as sheet1.

Basically, what I'm looking for is a column in sheet1 to show a link automatically IF the reference number in columnA sheet1 is also found somewhere in columnB in sheet2.

Is this possible? If so, how would I work this? I'm hoping to use a formula, but I'm not sure if that's possible. Hoping to use VBA as a last resort since this will be a shared spreadsheet and the probability that someone might screw it up is decent.

Thank you, and please let me know if I should clarify anything.

解决方案

What you are looking for is a dynamic hyperlink.

So, let's assume that you have on Sheet1 all the

  • team members with the (column B)
  • team leads and the (column A)
  • reference / project numbers (column C).

On Sheet2 we have a table with various information and the same reference / project number in column E.

Then you can add a new column D to the table on Sheet1 which you might want to name Links and the formula here should be:

=HYPERLINK("#Sheet2!E"&MATCH(D2,Sheet2!E:E,0),"Link to "&D2)

If you are using tables with named columns that you can also use:

=HYPERLINK("#Sheet2!E"&MATCH([@[Reference Number]],Sheet2!E:E,0),"Link to "&[@[Reference Number]])

Of course you can adjust the alternative text to something more suitable.

Maybe the following picture helps explaining the above:

这篇关于如果值相同,则自动链接到另一个工作表中的单元格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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