Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021. 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.
Written by Allen Wyatt (last updated May 18, 2024)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021
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:
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (8186) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021. You can find a version of this tip for the older menu interface of Excel here: Hiding a Hyperlink on a Printout.
Professional Development Guidance! Four world-class developers offer start-to-finish guidance for building powerful, robust, and secure applications with Excel. The authors show how to consistently make the right design decisions and make the most of Excel's powerful features. Check out Professional Excel Development today!
When you print a worksheet, Excel allows you to also print handy gridlines for the worksheet. If you want to include the ...
Discover MoreNeed to print your worksheet on a non-standard paper size? Excel is rather limited in printing to such papers, and here ...
Discover MoreBorders not printing properly? It could be any one of a number of reasons causing the problem. This tip provides some ...
Discover MoreFREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
2024-05-18 16:19:46
J. Woolley
Here are some more ways:
1. Assuming the hyperlink in cell A1 of each sheet is a Ctrl+K hyperlink instead of a HYPERLINK(...) formula, select all sheets and replace the value in cell A1 with a single apostrophe ('). Cell A1 on each sheet will appear blank but hovering the mouse over the cell will display the hyperlink's ToolTip and clicking the cell will activate the hyperlink.
2. Here is the HYPERLINK function's syntax:
=HYPERLINK(Link_Location, [Friendly_Name])
If you enter null text ("") for Friendly_Name, the cell's value will be blank but hovering the mouse over the cell will display the hyperlink's ToolTip and clicking the cell will open Link_Location.
3. My Excel Toolbox includes the following substitute for HYPERLINK:
=SuperLink(Link_Location, [Friendly_Name], [Screen_Tip])
Unlike HYPERLINK, SuperLink generates a standard Ctrl+K hyperlink and permits specification of a custom ToolTip.
4. The CommentHyperlink macro in My Excel Toolbox will create (or update) a hyperlink attached to a cell's existing unthreaded Comment (Note). The Comment's original formatted text is retained. The cell's value can be blank. With the Comment visible (Alt+R+T+O), click it to activate the hyperlink. Using the Page Layout ribbon, click Page Setup > Print Titles (Alt+P+I). This opens the Sheet tab of the Page Setup dialog where you can disable printing Comments (Notes).
See https://sites.google.com/view/MyExcelToolbox
and https://excelribbon.tips.net/T009086_Hyperlinks_in_Comments.html
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.
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2024 Sharon Parq Associates, Inc.
Comments