How to create clickable hyperlinks in pivot table?
You can easily click a hyperlink to link to its webpage in a worksheet, but if you create a pivot table which contains hyperlinks, the hyperlinks will not be clickable. Do you have any good ideas to solve this problem in Excel?
- Reuse Anything: Add the most used or complex formulas, charts and anything else to your favorites, and quickly reuse them in the future.
- More than 20 text features: Extract Number from Text String; Extract or Remove Part of Texts; Convert Numbers and Currencies to English Words.
- Merge Tools: Multiple Workbooks and Sheets into One; Merge Multiple Cells/Rows/Columns Without Losing Data; Merge Duplicate Rows and Sum.
- Split Tools: Split Data into Multiple Sheets Based on Value; One Workbook to Multiple Excel, PDF or CSV Files; One Column to Multiple Columns.
- Paste Skipping Hidden/Filtered Rows; Count And Sum by Background Color; Send Personalized Emails to Multiple Recipients in Bulk.
- Super Filter: Create advanced filter schemes and apply to any sheets; Sort by week, day, frequency and more; Filter by bold, formulas, comment...
- More than 300 powerful features; Works with Office 2007-2019 and 365; Supports all languages; Easy deploying in your enterprise or organization.
The hyperlinks don’t work in pivot table by default, but fortunately, you can create a VBA code to make the hyperlinks be clickable in pivot table.
1. Hold down the ALT + F11 keys, and it opens the Microsoft Visual Basic for Applications window.
2. Then choose your used worksheet from the left Project Explorer pane, double click it to open a Module, and then copy and paste following VBA code into the blank Module:
VBA code: Create clickable hyperlinks in pivot table
Private Sub Worksheet_SelectionChange(ByVal Target As Range) 'Update 20140814 If Target.Cells.Count <> 1 Then Exit Sub On Error Resume Next Application.ActiveWorkbook.FollowHyperlink Address:=CStr(Target.Value), NewWindow:=True End Sub
3. Then save and close this code, go back to your worksheet, and now, when you click the hyperlink in your pivot table, the hyperlink will be activated and link to its webpage.
Note: This code is only available for the webpage links which begin with Http://.