pivotfields

  1. F

    PivotFields property

    Hi everyone, I have a problem with this code: Private Sub Worksheet_PivotTableUpdate(ByVal Target As PivotTable) Dim ws As Worksheet Dim pv As PivotTable Dim pf As PivotField Set ws = ThisWorkbook.Worksheets("Atleti e Media") Set pv = ws.PivotTables("PerATleta") Set...
  2. A

    Unable to get the PivotFields property of the PivotTable class

    Hi All, Facing issue with creating pivot table in loop. It's giving error: "Unable to get the PivotFields property of the PivotTable class" Here's the code: Sub PivotTableLoop() Dim ws As Worksheet Dim PivC As PivotCache Dim PivT As PivotTable Dim Table As ListObject For Each ws In...
  3. A

    Runtime Error 1004: Unable to get pivotfields property of the PivotTable Class

    Hello Community, Looking for a little VBA love. Current macro simply done by recording. So I couldn't screw up the language code. I have 2 sheets: 1 for Brands and Brands Top Gain Loss. I would like to get rid of one sheet and allow a macro for Sort by "Dollar Sales" and "Dollar Sales Chg YA"...
  4. P

    User Form to Select Pivot Table Filters

    Hey Guys, I have series of sub functions running through, while running I need a User form to pop up asking user to select pivot filters. I've broken it down to steps while running sub. Step 1 (Macro Running): I will be creating a pivot table (say PT1) with all pivot items selected initially...
  5. D

    Cycle through Pivot Table values -

    Hello, I'm trying to cycle trough values in very simple Pivot Table. Two rows and one Sum value. Now I see the very strange shift during the cycle - please see the screenshot. Yellow outlined cells are shifted - with the incorrect "Month". Red outlined cells are the duplicates - they are the...
  6. C

    Filter PivotFields Containing String

    I have a pivot table and I'd like to filter by pivotfield: "Inspectionitem". I'd originally done it like this: 'data worksheet and cache defined up here Set pt1 = ActiveSheet.PivotTables.Add(cacheofpt1, Range("A1"), "DP_Electrical") 'put the feilds in With pt1'blahblahblah other pivotfields...
  7. K

    Capture PivotFields rows and column from PivotItem in VBA

    I've tons of examples on here of how to reference a PivotValue and even find the Row source, but not quite what I'm looking for. I have a pivot table that is made from a summary of 3 different tables so the drill down doesn't work on it. I want to use the BeforeDoubleClick and just write it...
  8. M

    vba does not reflect change in pivottable

    Morning all (well its morning here) :) I have a pivot table that I need to make change from SUM to Average depending on what slicer button is selected. Initially I had a few issues in that the code caused an endless loop, however I solved that by adding Application.EnableEvents = False at the...
  9. S

    Using a String Variable in PivotFields option on PivotTable

    Hi all, I'm using Excel 2013 and trying to use a string variable in the PivotFields option. I nearly have everything I need working but I keep getting the below error: PivotFields method of PivotTable class failed The problem line lies here: ActiveSheet.PivotTables(pt.Name).PivotFields...
  10. X

    "Results Thru xx/xx/xxx" Report Heading - Obtain max date from PivotItems

    I need to create a report heading that says "Includes YTD sales thru xx/xx/xxxx." I would like to write a VBA which dynamically assigns the maximum sales date that was located within a pivot table field (PivotItem list). Notice that I didn't say that I want to change the filter... I only...
  11. N

    VBA to automatically create individual pivot tables for each row header and allow filtering by region

    Hello VBA Gurus, Could really use your expertise. I'm trying to create a project schedule that can be filtered by region. The only way I found to do that was to create Pivot Tables and filter each one. I need to be able to automatically create the pivot tables and filter each caption by...
  12. V

    Filter Pivot table error

    Hi, I am trying to filter a pivot table field named ("id") with ID="xyz". Below is the code I am using however I am getting a application or object defined error. Please let me know how to fix this error. Thanks for your help. Sub filter() With Worksheets("xyz").PivotTables(1)...
  13. 03856me

    Problem with PT refreshing after page field changes

    I have a pivot table with date as a page field. I have the following code which works on the surface, it does change the page field to the most recent date that is stored in cell H7. But the pt does not change - it is not recognizing the date. I tried refreshing again but it changes the date...

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