EliseFreedman
Programmer
Hi There
I have a spreadsheet which brings together various totals from some underlying spreadsheets. Initially I had used countifs to display the totals on the summary spreadsheet. However, following a meeting with a couple of other colleagues this morning I need to change my approach. The stakeholders are keen to be able to click on the totals in the summary spreadsheet and view the underlying data. It has been suggested that rather than using countifs, I use pivot tables in a hidden sheet and then use getpivotdata to get the totals to display in the summary sheet. That is straightforward enough. However, the bit I am struggling with is adding the functionality to be able to click on the value in the summary sheet and display the underlying data. I have created a macro which determines which row they have clicked and then used that row in the filter to find the matching data in the underlying spreadsheet. This works perfectly if I select a cell and then run the macro manually.
However, I would like the macro to fire anytime the user clicks on the cell within the column. Seems straightforward enough but nothing happens when I click on any of the cells. It just shows the formula that is within the cell. Can anyone tell me what I am doing wrong
I have tried the following code
Thanks in Advance
I have a spreadsheet which brings together various totals from some underlying spreadsheets. Initially I had used countifs to display the totals on the summary spreadsheet. However, following a meeting with a couple of other colleagues this morning I need to change my approach. The stakeholders are keen to be able to click on the totals in the summary spreadsheet and view the underlying data. It has been suggested that rather than using countifs, I use pivot tables in a hidden sheet and then use getpivotdata to get the totals to display in the summary sheet. That is straightforward enough. However, the bit I am struggling with is adding the functionality to be able to click on the value in the summary sheet and display the underlying data. I have created a macro which determines which row they have clicked and then used that row in the filter to find the matching data in the underlying spreadsheet. This works perfectly if I select a cell and then run the macro manually.
However, I would like the macro to fire anytime the user clicks on the cell within the column. Seems straightforward enough but nothing happens when I click on any of the cells. It just shows the formula that is within the cell. Can anyone tell me what I am doing wrong
I have tried the following code
Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If ActiveCell.Column = 10 Then
Call SelectTeam()
Else
End If
End Sub
Thanks in Advance