double click on highlighted cells in pivot table

ilkhomjon

New Member
Joined
Jul 28, 2021
Messages
3
Office Version
  1. 2016
Platform
  1. Windows
Hi. I have more than 100 hundred pivot tables with highlighted cells in different workbooks. And I need to double click on each of the highlighted cells to see the details of those highlighted cells. can you help me to write a code for automatically double clicking on highlighted cells in pivot table. it would be very helpful.
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Assuming you want to show the details of the highlighted cells in a new worksheet? If so the code that will do this is

VBA Code:
Range("B10").ShowDetail = True

Of course you will have to surround this with the specific worksheets and actual range addresses, but the code above will open a new worksheet for the details of the cell if it is contained in a pivot table.
 
Upvote 0
Assuming you want to show the details of the highlighted cells in a new worksheet? If so the code that will do this is

VBA Code:
Range("B10").ShowDetail = True

Of course you will have to surround this with the specific worksheets and actual range addresses, but the code above will open a new worksheet for the details of the cell if it is contained in a pivot table.
1627556300877.png

This is a code for double clicking every cell in pivot table that I found in this website and I need to change it into a code that doesn't doubleclick if the cell is not highlighted. I need details of only highlighted cells and there are more than 50 highlighted cells out of 500 cells in pivot table. Could you please help me.
 
Upvote 0
VBA Code:
For Each c In .DataBodyRange
    If c.Interior.Color <> xlNone Then
        c.ShowDetail = True
        ActiveSheet.Name = c.Address
    End If
Next
 
Upvote 0
Solution

Forum statistics

Threads
1,214,599
Messages
6,120,453
Members
448,967
Latest member
grijken

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top