Filter a pivot table filter with a wild card

LenaMWork

New Member
Joined
Aug 4, 2015
Messages
13
Hello everyone
I`m new here and I have no knowledge regarding VBA (none what so ever) so I apologize in advance...
I`ve recorded a macro that looks like this:
Sub Team()
'
' Team Macro
'
'
ActiveSheet.PivotTables("PivotTable1").PivotFields( _
"[Feature Area].[Team].[Team]").VisibleItemsList = Array( _
"[Feature Area].[Team].&[T_FW_Superman]&[P_A]", _
"[Feature Area].[Team].&[T_FW_ Superman]&[P_B]", _
"[Feature Area].[Team].&[T_FW_ Superman]&[P_C]", _
"[Feature Area].[Team].&[T_FW_ Superman]&[P_LOS]", _
"[Feature Area].[Team].&[T_FW_ Superman]&[P_RIO]", _
"[Feature Area].[Team].&[T_FW_ Superman]&[P_LONDON]", _
)
End Sub

I need to select a string that begins with a specific name:T_FW_ Superman while the ending can be anything (the selection is made from a filter of a pivot table)
I have a lot of these specific names and I need to clear the filter each time before I make another selection
Also, I need to put these names in a combo box for the user to select from.
Can someone please help me?.

Thank you in advance!
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"

Forum statistics

Threads
1,215,632
Messages
6,125,909
Members
449,274
Latest member
mrcsbenson

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