Excel条件超链接为两个条件输出超链接 [英] Excel conditional Hyperlink outputs the Hyperlink for both conditions

查看:624
本文介绍了Excel条件超链接为两个条件输出超链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想我一定在这里生气,我想做的是写一个简单的Excel公式来执行IF测试,如果结果是假的,我想超链接一些文本,如果它是真的我想显示一些没有超链接的文本。



所以例如 -

  = IF(1 = 1,1,HYPERLINK(2))

1如您所料,但1是超链接 - 我只想超链接,如果值为2。



当然这可以吗?提前感谢任何建议!

解决方案

更新:



哦,我错了我检查了这一点,这是因为当Excel在单元格中看到超链接功能时,会将整个单元格变成可追踪单元格,以使链接工作。



避免出现错误信息的工作网站的地址无效(当超级链接为单元格打开时发生,但链接无处可走)...
要给出excel一个链接,通过引用公式的单元格地址无效。



粘贴到单元格A1的示例:

  = IF(1 = 2,HYPERLINK( # &安培; CELL( 地址,A1), 1),超链接( C:\, 2 ))


I think I must be going mad here, what I want to do is to write a simple Excel formula that performs an IF test, and if the result is false I want to hyperlink some text, if it is true I want to display some text which is not hyperlinked.

So for example -

=IF(1=1,"1",HYPERLINK("2"))

this returns 1 as you would expect, but the 1 is hyperlinked - I only want to hyperlink if the value is 2.

Surely this is possible? Thanks in advance for any advice!

解决方案

Update:

Oh, I was wrong. I checked into it and this happens because when Excel sees the 'Hyperlink' function in a cell it turns the entire cell into a 'followable' cell so that links will work.

The work around to avoiding the error message "The address of the site is not valid" (which occurs when the hyperlink is turned on for the cell but the link has nowhere to go)... is to give excel a link that goes nowhere by referencing the cell address of the formula.

Example to paste into cell A1:

=IF(1=2,HYPERLINK("#"&CELL("address",A1),"1"),HYPERLINK("C:\","2"))

这篇关于Excel条件超链接为两个条件输出超链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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