Hyperlinks in Comments

Written by Allen Wyatt (last updated June 13, 2020)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365


9

Excel makes it rather easy to insert a hyperlink into a cell. You may, however, want to actually add a hyperlink to a comment instead of to a cell. This can also be done; the trick is to make sure that the only thing contained in the comment is the hyperlink itself.

Note that Microsoft changed the way comments work in Excel in Office 365. Comments are now threaded allowing users to have discussions with each other regarding the data. Notes work like comments in earlier versions of Excel. The following steps apply both to earlier versions of Excel using comments and to Excel for Office 365 using notes:

  1. Right-click on the cell that you want to contain the comment. Excel displays a Context menu.
  2. Choose Insert Comment or New Note from the Context menu. Excel adds the comment/note and places the insertion point within the comment/note box.
  3. Press the Backspace key enough times that you delete the username. The insertion point should be at the very beginning of the cell.
  4. Type the URL you want to use for the hyperlink.
  5. Press the Delete key a few times to delete any non-printing characters that may exist after the insertion point in the comment/note box.
  6. Click a different cell. The comment/note should disappear.
  7. Right-click the same cell to which you added the comment/note (the same cell as in step 1). Excel displays a Context menu.
  8. Choose Show/Hide Comment/Note from the Context menu. The comments/notes in your worksheet are displayed.

Now you can click on the comment/note that contains the URL and Excel helpfully opens the browser and displays whatever is at that URL. You needed to perform steps 7 and 8 because you need to hover the mouse pointer over the comment/note containing the URL (in order to click it) and you can't hover over a comment/note that isn't displayed.

If you still cannot get the hyperlink to activate successfully, there are two probable culprits. First, you need to make sure that the hyperlink itself is initially the only thing in the comment/note. (More on that in a moment.) That is why you need to perform steps 3 and 5 in the above sequence of steps. The other possible culprit is that you didn't put in a URL that Excel could recognize as a URL.

Now, more on the URL being the only thing in the comment/note. Interestingly enough, once you get the URL to work properly you are free to change the text that the comment/note contains. So, for instance, when I created a comment/note that contained the URL "www.tips.net" (without the quote marks) and nothing else, I could then click on the comment/note and the webpage was displayed. I could then go back, right-click the comment/note to edit it and change the text to something else (such as "Let's go to Tips.net"). Even though the URL was no longer visible, the link was still active in the comment/note and clicking on the comment/note displayed the Tips.net webpage.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (9086) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Selectively Changing Endnotes to Footnotes

Want to turn some (but not all) of your endnotes into footnotes. Rather than do it manually, you can apply the shortcut ...

Discover More

Skipping Hidden Rows in a Macro

As your macro processes information in a worksheet, you may want to make sure that it skips over rows that are hidden. ...

Discover More

Cannot View Multiple Pages at Once

What do you do when a ribbon tool you rely upon suddenly disappears? That's the situation addressed in this tip, where ...

Discover More

Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!

More ExcelTips (ribbon)

Generating a Web Page

Want your worksheets to be available to others on the Internet? Excel provides a way you can save your data in HTML ...

Discover More

Specifying Your Target Monitor

When you create a worksheet that is destined for viewing on the Web, you will want to specify the monitor resolution you ...

Discover More

Hyperlink Doesn't Match Cell Contents

When you add a hyperlink to a worksheet, over time and after doing a bunch of editing, what you see in the cell can get ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 2 + 2?

2022-02-07 06:21:08

Nuno

Thank you J. Woolley, it does helped!

I used your ActiveCell.Comment.Shape.Hyperlink.Delete in the Immediate Window and as a Macro and it did cleared the hyperlink.

Comments does have a particular behaviour, they are a type of shape but it doesn't support all shape properties, and no option is available to remove the comments hyperlink


2022-02-04 10:18:55

J. Woolley

If you don't want to use the CommentHyperlink macro described below, you can remove a comment's hyperlink like this. Select the comment's cell, press Alt+F11 to open the VBA Editor, press Ctrl+G to open the Immediate Window, then paste the following line into the Immediate Window and press Enter:
ActiveCell.Comment.Shape.Hyperlink.Delete


2022-02-03 10:07:52

J. Woolley

@Nuno
If you use the CommentHyperlink macro in My Excel Toolbox, you can remove a comment's hyperlink without deleting the comment.
See https://sites.google.com/view/MyExcelToolbox/


2022-02-02 07:48:47

Nuno

Is there a way to remove the Hyoerlink without deleting the comment?


2021-05-30 12:10:38

J. Woolley

You might be interested in the freely available CommentHyperlink macro in My Excel Toolbox, which automates the technique described in this Tip to create or update a hyperlink attached to the active cell's unthreaded Comment (Note). The hyperlink can be any protocol URL like mailto:..., http://..., ftp://..., etc., or a [FILE]#'SHEET'!RANGE address like
[A Book.xlsx]#'A Sheet'!A1:C3 or #Sheet1!Total" or #E5 or MyDoc.docx#SectionD or Contract.pdf. The Comment's original formatted text will be restored. See https://sites.google.com/view/MyExcelToolbox/


2021-02-14 10:14:27

Ted

Can you create a hyperlink to another worksheet in the workbook within a comment?


2020-06-18 12:28:36

Bob Williams

Wonderful little article about putting hyperlinks in cell comments! When I tried it, it did not work. Finally found the culprit, which you should mention in your article. Under "File / Options | Proofing [AutoCorrect Options] | Autoformat as your type" is a box under "Replace as your type" about hyperlinks that has to be checked for your instructions to work.
The other trivial thing to note is that you cannot edit the comment by holding down the left mouse button as you can with a URL in a cell. You must use right-click / Edit Text.
Bob Williams


2020-06-15 12:42:21

Ronmio

Great tip! Who would have thunk that, after you strip down the comment to the bare URL and use it, then you could still embellish it to make it a real comment again.


2020-06-14 07:54:17

Roger

Another possibility for urls not being active in notes is if the internet/email has been disabled in auto-correct. Rare but possible.


This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.