Why is this PivotItem.Visible call throwing a TypeMismatch error?

后端 未结 4 1433
失恋的感觉
失恋的感觉 2021-01-26 19:22

This is baffling us. I have a standard pivot table with a report filter on it that allows multiple selection of items. I can get the selected items in the report filter with:

4条回答
  •  失恋的感觉
    2021-01-26 19:25

    just ran into this issue, seemed that the multiple ways to format a date is really the bigger problem when working with pivot tables. if the format is a true dd/mm/yyyy (or mm/dd/yyyy) it seems fine, but shortening to yy gave me issues. changing the pi.value to string really did solve the issue with mismatch type error, however by going to pivot table field list, clicking on my date row pivot item and field settings there's a number format button where you can change the format of the pivot item like you would change the format of a cell. so however the dates are arranged and carried through the spreadsheet, as they come into the pivot table i was able to edit the format to "mmm d" and my problem was solved.

提交回复
热议问题