Link to home
Create AccountLog in
Microsoft Excel

Microsoft Excel

--

Questions

--

Followers

Top Experts

Avatar of fredgcook
fredgcook

How to create a dynamic hyperlink to a cell in a pivot table?
I am building a dashboard where difference sections reference multiple pivot tables. I enter the date for the dashboard in a cell (A8) and use that cell in the GetPivotData function (H1) to pull data for a specific month from the pivot table. Now I would like to be able to click a hyperlink in the same cell that has the GetPivotData formula (H1) and go to that part of the pivot table. Maybe I am missing an easier way to do this, but I have had difficulty creating a hyperlink that looks to another field for part of the string.  For example, I will enter 7/31/13 in cell A8.  I put A8 in the GetPivotData string so that cell H1 in my dashboard shows pivot table data for 7/31/13.  If I change cell A8 to 6/30/13, then the data in H1 in the dashboard automatically shows pivot table data for 6/30/13.  I would like the hyperlink in H1 to automatically go to the correct cell in the pivot table based on the date entered in cell A8.  Thanks for your help.

Zero AI Policy

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


Avatar of Nick67Nick67🇨🇦

Are you able to post a sample workbook?
That may be why no one has yet tried to tackle your challenge :)

Is the  GetPivotData  function something that you have created in VBA.
It should be possible, if it is, to get it to simultaneously update the hyperlink.

Avatar of Nick67Nick67🇨🇦

Here is a sample, albeit a simple one.
H1 becomes a custom function call that uses A8 as a reference
It then calls GetPivotData for stuff on Sheet3 and updates a hyperlink in A8 to point to the row in the PivotTable that was retrieved.

Have a look at the VBA code-behind that makes it work.
Can you adapt it to your needs?
Dynamic-Hyperlink.xls

Avatar of fredgcookfredgcook

ASKER

Nick67 - Thanks for the sample.  Will I have to write VBA code for every link?  I have attached a screen shot that shows several sections of the dashboard.  When complete, there should be a link for every cell with a value.
hyperlink-dashboard-1.JPG

Reward 1Reward 2Reward 3Reward 4Reward 5Reward 6

EARN REWARDS FOR ASKING, ANSWERING, AND MORE.

Earn free swag for participating on the platform.


ASKER CERTIFIED SOLUTION
Avatar of Nick67Nick67🇨🇦

Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.
Create Account
Microsoft Excel

Microsoft Excel

--

Questions

--

Followers

Top Experts

Microsoft Excel topics include formulas, formatting, VBA macros and user-defined functions, and everything else related to the spreadsheet user interface, including error messages.