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

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

问题描述

我想我一定要疯了,我想做的是编写一个简单的Excel公式来执行IF测试,如果结果为假我想超链接一些文本,如果是真的我想显示一些没有超链接的文本.

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.

例如 -

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

如您所料,这将返回 1,但 1 是超链接的 - 如果值为 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!

推荐答案

更新:

哦,我错了.我检查了它,这是因为当 Excel 在一个单元格中看到超链接"功能时,它会将整个单元格变成一个可关注"单元格,以便链接可以工作.

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.

避免错误消息站点地址无效"(当为单元格打开超链接但链接无处可去时会发生这种情况)的解决方法...就是通过引用公式的单元格地址给excel一个无处可去的链接.

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.

粘贴到单元格 A1 的示例:

Example to paste into cell A1:

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

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

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