Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Hiding a Hyperlink on a Printout.

Hiding a Hyperlink on a Printout

Written by Allen Wyatt (last updated May 24, 2022)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365


2

Kathy has a hyperlink in cell A1 of every worksheet in her workbook. The hyperlink, when clicked, displays a worksheet that contains a table of contents so she can move around the enormous workbook faster. Kathy doesn't want to print the hyperlink when she prints the worksheets. She wonders if there is any way to format the hyperlink so it doesn't print. She notes that hiding column A or row 1 defeats the purpose because she wants this cell visible while working in the workbook.

There are many ways you can go about this. Perhaps the easiest way is to just "hide" the information in cell A1 so it is not visible and won't print out. One way to do this is to format the text in the cell as white, since white-on-white is quite invisible. The link would still be there and could easily be clicked, but it wouldn't be visible.

A similar result can be had by applying a custom format to the cell. Just use the format ";;;" (that's three semicolons, without the quote marks) and the information in the cell disappears from view. Again, you can still click the link, even though it is quite invisible.

Another way to approach the problem is to define print areas for each of your worksheets. Just exclude the first row of each worksheet from the print area, and it will never show up on the printout. The added benefit to this approach is that the hyperlink is still visible on each worksheet.

You could also put your hyperlink into a text box instead of cell A1. The text box could then be formatted so that it doesn't print. (Select the text box, right-click and choose Size and Properties, display the Properties tab, and uncheck the Print Object check box.)

Another approach is to not use hyperlinks in your worksheets, but instead add a form button that, when clicked, runs a macro that takes the user to the main worksheet. (How you create form buttons has been discussed in other issues of ExcelTips.) Form buttons aren't included when you print your worksheets.

A rather unique approach is to use Microsoft Word to help you create the link. You can, in Word, create a hyperlink and then format that hyperlink as Hidden text. (How you format Hidden text can be found on the WordTips website.) Then, copy the text of the link to the Clipboard and paste it into Excel as a Word object. The object can then retain the features of Word—including the text being hidden—and still be "clickable" in Excel.

Finally, you could use macros to facilitate printing your worksheets. Add the following macro to the ThisWorkbook object:

Private Sub Workbook_BeforePrint(Cancel As Boolean)
    Dim wks As Worksheet

    For Each wks In Worksheets
        wks.Range("A1").NumberFormat = ";;;"
    Next
End Sub

All this does is to apply, to all the worksheets in the workbook, the special custom format described earlier in this tip. The macro is automatically run just before printing. After printing the formatting is still in the worksheets. You can then include a second macro to apply the General format to cell A1 in the workbook being activated:

Private Sub Workbook_SheetActivate(ByVal Sh As Object)
    Sh.Range("A1").NumberFormat = "General"
End Sub

Note:

If you would like to know how to use the macros described on this page (or on any other page on the ExcelTips sites), I've prepared a special page that includes helpful information. Click here to open that special page in a new browser tab.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (8186) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365. You can find a version of this tip for the older menu interface of Excel here: Hiding a Hyperlink on a Printout.

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

Changing the Height of a Font

Scaling the width of a font is easy to do with Word's formatting capabilities. Scaling the height of the fonts is not so ...

Discover More

Defeating Automatic Date Parsing

Excel is continually trying to figure out what type of data is being stored in a cell. If it can interpret a value as a ...

Discover More

Making Highlighting Disappear when Typing

Select a highlighted word or phrase and start typing, and Word maintains the highlighting on what you enter. If this ...

Discover More

Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!

More ExcelTips (ribbon)

Flipping Landscape Orientation when Printing

When printing a worksheet, you may want to rotate the output on the page to fit a certain orientation. Excel doesn't ...

Discover More

Printing Individual Worksheets for Vendors

If you use a worksheet to track data for multiple vendors, you may wonder if there is a way to print individual ...

Discover More

Limiting Printing to a Workbook from a Set Location

When you share workbooks on a company server, it can be frustrating if the workbooks are downloaded to individual ...

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 6 + 5?

2022-05-25 15:22:37

J. Woolley

Here is the HYPERLINK function's syntax:
=HYPERLINK(link_location, [friendly_name])
If you enter "" for friendly_name, the cell's value will be blank; clicking the cell will still open link_location.
You achieve the same effect with a Ctrl+K hyperlink by replacing the cell's value with an apostrophe (').
In both cases, hovering the mouse over the cell will display the hyperlink's ToolTip.


2022-05-25 11:47:55

J. Woolley

Here is yet another way:
My Excel Toolbox includes the CommentHyperlink macro, which will create (or update) a hyperlink attached to a 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 is retained. Click the Comment to launch the hyperlink.
Using the Page Layout ribbon, click Print Titles to open the Sheet tab of the Page Setup dialog and disable printing Comments (Notes).
See https://sites.google.com/view/MyExcelToolbox
and https://excelribbon.tips.net/T009086_Hyperlinks_in_Comments.html


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.