How to remove certain elements from the Pivot Table...

omairhe

Well-known Member
Joined
Mar 26, 2009
Messages
2,040
Office Version
  1. 2019
Platform
  1. Windows
How can I remove certain elements from the pivot table's filter field from cells A1 and B2.

For instance I would like to hide or remove 3 elements.

1. The Dropdown icon on cell B1.
2. (All) text from cell B1.
3. Entire cell A1

Please note that double clicking on cell B1 will function the same as opening the dropdown menu.
PivotTableCustomize.jpg




Even if any one of these could be removed it would be great help.
Thanks and will appreciate.
 
See if this is any use for 1

For 2 would it suffice to format cell background and font color the same as each other?

Not sure what you are wanting for 3 as you cannot 'remove' a single cell
 
Upvote 0
Solution
See if this is any use for 1

For 2 would it suffice to format cell background and font color the same as each other?

Not sure what you are wanting for 3 as you cannot 'remove' a single cell
I made use of the scenario to something like what I was wanting in point number 3... now double clicking on the pivot field will automatically pop open the dropdown menu. and as soon when specific country name is selected then the dropdown will disappear.

VBA Code:
Private Sub Workbook_SheetBeforeDoubleClick(ByVal Sh As Object, ByVal Target As Range, Cancel As Boolean)
'pivot table tutorial by contextures.com
Dim pt As PivotTable
Dim pf As PivotField
On Error Resume Next
Set pt = ActiveSheet.PivotTables(1)
  For Each pf In pt.PivotFields
      pf.EnableItemSelection = True
  Next pf
End Sub

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
'pivot table tutorial by contextures.com
Dim pt As PivotTable
Dim pf As PivotField
On Error Resume Next
Set pt = ActiveSheet.PivotTables(1)
  For Each pf In pt.PivotFields
      pf.EnableItemSelection = False
  Next pf
End Sub


Thank you Peter.
 
Upvote 0

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