I have working code for a pivot table (pt) but want to filter the 2nd pt further from value at 1st pt.
Dim LResult As String PSselect = myfilterTypePS LResult = Left(myfilterTypePS, 5) With PvtTblRental .PivotFields("Facility Number").ClearLabelFilters .PivotFields("Facility Number").PivotFilters.Add Type:=xlCaptionEquals, '.PivotFields("RS_Usage_UIC").PivotFilters.Add Type:=xlCaptionEquals, Value1:=LResult Value1:=myfilterFacNum End With
The 3rd line under the "With PvtTblRental" does not execute properly - for a good reason as follows.
The 1st pt contains "61050 Admin", and the 2nd pt "61050 Admin (other text)"
I cannot use the 1st pt string to filter the 2nd pt because the strings are not equal. So my following question is:
Can I use something like ".PivotFields("RS_Usage_UIC") = Left(myfilterTypePS, 5)" which would just consider the first 5 characters - and basically making the strings equal.
Then I can filter the 2nd pt with "61050".