Excel 2016 slicer item now has wrong name but refers to correct item in pivot table? Very strange

codeliftsleep

Board Regular
Joined
Apr 14, 2017
Messages
103
This has to be the strangest bug I've ever seen in Excel.

I created 2 slicers that control numerous pivot tables. In VBA, I check who the user is on login and then loop through the slicer names to set their name as the only one marked as true. Simple code right--the same code I have done in numerous other workbooks and never had an issue. Wrong...somehow now my name has replaced another person's name on the slicer item, and I have no data in the data source and never have(there is no possible way my name should be in the slicer). Even stranger is the pivot table filter is showing the correct name in there but the wrong name in the slicer. When I click my name in the slicer it correctly filters the pivot table for the correct person, ie somehow in the process of doing this my name has replaced this person's in the slicer but it is linked to the other person's name in the pivot table. Obviously I cannot rename the slicer item because it is a read only property.

Even stranger is on some of the other pivot tables the slicer is connected to, my name has replaced his in the filter also, so he no longer appears but my name still refers to his data---ie, my name replaced his, but it still pulls his data when I filter it. I have tried everything from refreshing the data to deleting the slicer and recreating it to reimporting the data to closing and opening the workbook again...nothing has worked...the issue still remains.

I also have it set to only loop through the code and redo the slicers if it is NOT me logged in...

I am at a loss here. It's not feasible to redo all the pivot tables, there are simply too many of them. Any suggestions as to how this could have happened and how to resolve it?? I have searched on google and haven't found anyone posting about this issue...
 
Last edited:

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
It sounds to me as though you’ve changed the caption for the item somehow - probably in your code. Hard to be sure without seeing the workbook.
 
Upvote 0
It sounds to me as though you’ve changed the caption for the item somehow - probably in your code. Hard to be sure without seeing the workbook.

That's what I thought to but I don't use the caption property at all...and besides its read only, so I don't know how that is possible.

Code is really basic

Code:
With ThisWorkbook.SlicerCaches("Slicer_MgrName")
            .ClearManualFilter
            For Each si In .SlicerItems
            
                If si.Name = MgrName Then
                    si.Selected = True
                Else
                    si.Selected = False
                End If
            Next si
        End With
 
Upvote 0
Are you sure you didn’t accidentally overtype a cell in one of the pivot tables at any point?
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,289
Members
452,631
Latest member
a_potato

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