Hyperlink changes from # to %20-%20 when clicked in Excel

There is a workaround:

Change the default value "htmlfile" of HKEY_CLASSES_ROOT.htm key by another value, i.e "IEhtml".

This answer is based on the following article and worked for me in MS Escel 2010: http://answers.microsoft.com/en-us/office/forum/office_2013_release-word/word-2013-hyperlink-converting-to-20-20/4e8a2e8d-b889-4c77-8276-551b11e296d4


I believe this might be of help to some people so i said id post it: I had the same problem with Word and as a work around i used a URL Encoder Do a quick search for one there's plenty such as here :

http://www.w3schools.com/tags/ref_urlencode.asp

Simply paste the url ,it will give back the Url that will work in a hyperlink from Word Excel etc.


This seems to be IE specific, on Chrome the URL works correctly.

However I found adding ENCODEURL() fixed the issue for me.

Original version:

=IFERROR(HYPERLINK(VLOOKUP(B12,Table1,13,0),"Click Me"),"")

Fixed version:

=IFERROR(HYPERLINK(ENCODEURL(VLOOKUP(B12,Table1,13,0)),"Click Me"),"")

This is a known issue with MS Excel. Basically, the hash/pound (#) sign is a valid character to use in a file name but is not accepted in hyperlinks in Office documents. The conversion to %20-%20 appears to be by design.

However, take a look at this question, highlighting the same issue but with Excel 2010:

  • Excel hyperlink to web page location with id or named anchor

which seems to imply it might be a browser issue with IE. If you can set another browser as your default, even temporarily for testing, it might work.

Tags:

Excel