Add Clickable Hyperlinks-Excel Pivot Table-Macro Code

Add Clickable Hyperlinks-Excel Pivot Table

Excel pivot tables don’t show hyperlinks, but there’s a way around that problem! In the video below, you’ll see how to create fake clickable hyperlinks in a pivot table, by using a few lines of Excel VBA code, and a bit of formatting.

No Hyperlinks in Pivot Table

Unfortunately, even if there are valid hyperlinks in your source data table, those hyperlinks will NOT appear in a pivot table that’s built from that data.

Instead, you’re stuck with a pivot table limitation:

  • The pivot table shows any hyperlink URL address as a normal, non-clickable, text string
  • If you click on a cell with one of those pivot table URL text strings, nothing happens
  • Unlike a real hyperlink, those URL addresses are not clickable, so you do NOT go to the website location

no clickable hyperlinks in Pivot Table

Make Fake Clickable Hyperlinks

Fortunately, there’s a workaround that you can use, to create fake clickable hyperlinks in a pivot table. The video in the next section shows the steps:

  • First, you’ll format the pivot table link text items so they look like real hyperlinks
  • Next, you can copy my Excel VBA code, and add it to your workbook, to make each link clickable, almost like a real hyperlink

There’s one thing to keep in mind though – when you point to one of the fake hyperlink cells in the pivot table, the mouse pointer does NOT change to a pointing hand.

  • Tip: You could add a note above the pivot table, to let people know about the pointer, if anyone besides you will be using those pivot table hyperlinks.

mouse pointer does not change to a pointing hand

Video: Clickable Hyperlinks in Pivot Table

Here’s the video that shows the steps for creating clickable hyperlinks in an Excel pivot table.

You can get the sample file from this video on my Contextures site – there’s a link in the next section.

And last week, someone asked me if it was possible to have two pivot fields with hyperlinks. So, I wrote a slightly revised macro, and I’ve just uploaded a second sample file, with the new code, to make two different pivot fields clickable.

Get the Hyperlinks Sample File

Here’s how you can get the Excel VBA code, to add this pivot table hyperlink trick to your own workbooks.

1) First, click this link, to go to the Hyperlinks page on my Contextures site.

2) Next, on that Hyperlinks page, download one of the sample files with the Pivot Table Fake Hyperlink code. There are two versions of the workbook

  • one workbook has code for a single hyperlink pivot field
  • other workbook has code for two hyperlink pivot fields

3) Finally, unzip the downloaded Excel file, copy the code, and paste it into your own workbook. (Paste it onto the Worksheet code module, where your pivot table is located.

_______________________

Add Clickable Hyperlinks-Excel Pivot Table-Macro Code

Add Clickable Hyperlinks-Excel Pivot Table-Macro Code

______________________

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.