Excel HYPERLINK bug (?)

Copper Contributor

A simple formula like this

=IF(1+1=2; "correct";
HYPERLINK("#C4";"false")
)

leads to strange behavior in Excel (desktop version). It displays "correct" in the cell, but erroneously with a clickable hyperlink that leads to nowhere. What is going on? 

2 Replies
Played with those only recently. The HYPERLINK "function" is weird in so much as it is the only "function" (it probably really isn't a function) that reformats the containing cell. This is probably what's going on here too. You seem to be thinking that the HYPERLINK function is only actionable when the IF fails, but in my perception this is not how Excel approaches HYPERLINK. It detects the word HYPERLINK somewhere in that cell and applies the formatting. Your IF then fails to supply the target in the THEN branch - Excel won't care.
Yes, it seems that whenever HYPERLINK is used in the formula, the whole cell is interpreted as a hyperlink. Which to me is not just weird, but a bug... Also, the Hyperlink / Followed Hyperlink cell styles are applied automatically. These can be changed for the workbook (e. g. no underline), but not deleted (will reappear).