1. wsnyder

    Run Time Error 1004 'Unable to get the PivotFields property of the PivotTable class

    Hi all, Using Excel365 My code is retuning an error Not sure why? I am trying to add 4 Row Fields to the Pivot Table. The first 3 are added to the Pivot, but not the 4th. I see the column in the data source I can manually drag the field from the Field List to the Rows Fields Not adding the...
  2. B

    Create Same Pivot but filter differnt value in each workbook

    Hi Team, I have below code where I am creating new worksheet for each director in the list and named the worksheets to the directors name. Sub test() Dim a As Variant Dim i As Long Dim ws As Worksheet a = Cells(2, 2).Resize(Cells(Rows.Count, 2).End(xlUp).Row - 1) For i = 1...
  3. J

    Unable to set the currentpage property of the pivotfield class

    Hi there, Leveraging some posts online, I have created a macro that should allow the user to make filter selections on one sheet while having the actual pivot table on another sheet. Sub Update_Pivot() Dim ws As Worksheet Set ws = ActiveWorkbook.ActiveSheet Dim wsname...
  4. B

    VBA to set PivotField value

    I have recently converted a project to use the Data Model and Power Pivots. This project has numerous Pivots on a template. The Pivots need to set the value of a PivotField to change the view between various departments. When I recorded the actions, I got a line that looks like this...
  5. V

    Can't refresh column filter in Pivot Table through VBA

    I am trying to use the following macro to automatically update a pivot table when something changes (just the barebones changes below) : Dim pf As PivotField Dim pt As PivotTable Set pt = Sheets("Top 10 Pivots").PivotTables("TotalUS") Set pf = pt.PivotFields("[MonthOnlyDateTable].[Fiscal...
  6. H

    Sub or Function not defined

    Hi, I modified the following code to refresh a set of filters in a pivot table based upon the values that are placed in cell range. I thought this code could work but I'm getting a "Sub or Function not defined" error. Any idea where I could have messed up this code? Do you think this will...
  7. J

    PivotTable Data Type Error

    Hey everyone.... I'm looking to create a macro that will update a PivotTable filter to the most current/recent date -- this date will be end of month (so a 01-31 for example, these dates are formatted like -- 2018-01-31T00:00:00). The idea is that the code will reference a cell within my...
  8. A

    VBA to change Power Pivot Filters

    Hi all, I have built a pivot table using power pivot; it's set to tabular view so that Customer Code and Company Name are in columns A and B. When a user clicks on the Company Code or Company Name then the Macro needs to jump to the P&L Sheet and change the customer Code to match... Option...
  9. G

    VBA - Move all Row Fields to Report Filter, Regardless of Field Name

    Hi, I'm building a macro right now that reads some filters a pivot table based on data entered in another master workbook. This file has to work with multiple (10+) different pivot tables, which are generated daily, and all of which have different Pivot Fields available. I've gotten to where...
  10. B

    VBA To make pivotfield use its source datas format

    Hi, As the title says I am trying to have my pivot table use the format for each field that its source data uses. I have used this code to change the names of each of the pivotfields in the pivot table and would preferably like a way to do this using the for loop indicated below when changing...
  11. G

    VBA Pivot Table - Pivotfield Dynamic?

    Hi, I have been looking for a solution to this for a while, I have found things that come close but when I try to emulate it, it fails. I have a file that I run at any given time that has 13 months of financial account balances. Those 13 months change each month based on the current month. For...
  12. P

    Trying to loop through data in the second column of a pivot table. Stuck. Need Help.

    Hi, I have a pivot table with two columns: Code and Quantity. I want to loop through the Quantity column and hide all values = 0. I can do this easily by incorporating this into my code: pt.PivotFields("Code").PivotFilters.Add _ Type:=xlValueDoesNotEqual...
  13. rkol297

    CRITICAL TIME FRAME - SUPER STUMPED!!!!! - Run-time error '1004': Unable to get the PivotItems property of the PivotField class

    I have this large macro that when it is contained as one large macro the code runs perfectly without issue. Sub RSLDashboardtesting() Dim APPSPD As Worksheet With Application .ScreenUpdating = False .Calculation = xlCalculationManual .DisplayAlerts = False...
  14. C

    Updating Pivotfields from a Data Validation list across multiple Pivot Tables on Multiple sheets

    Hello I have an issue that i have been playing around with my self for quite sometime now. I found a code that should work but for some reason it is not working and I haven't a clue why. Any help would be appreciated. Goal : Code that will take a drop list and modify the pivot filters on...
  15. I

    can I choose which pivotTable rows to subtotal?

    Do pivotFields have a property to let me not do any subtotal at all? For example, I have 'order by date' and 'item' as my rows, with 'amount' and 'deliver by date' as my values. I want to total amount, but totaling the dates doesn't make sense to me. I've been going with 'min of deliver by...
  16. S

    VBA: How do I use/fix pivot item and pivot field?

    I found some VBA code to separate a detailed list based on a pivot table filter. I modified the code from creating a separate file for each pivot item to creating a separate tab. That part works great. The detailed list is tasks by employee and the separated filter is director. The detailed...
  17. L

    Quick Question- VBA to swap Pivot Table Fields

    Quick question- I'd like to put in some code to swap the first field item in the row label section. I can do this by specifying the specific field I want to remove, but how can I get rid of the current "first field" if I don't know what it is? So I might have my Row Labels as: Name State...
  18. W

    Removing Column, Row and PageFields in Pivot Table

    Hey guys, I have the following problem. I have a Pivot Table that is linked to an Access Database. In order to get the required results for my management report I need to remove and drop a lot of column, row and page fields which requires a lot of time. I have recorded and tweaked over 40...
  19. M

    unable to get the pivotfields property of the pivottable class

    When I record a macro to remove a data field from a pivot table, I get this: ActiveChart.PivotLayout.PivotTable.PivotFields("Sum of orders").Orientation = xlHidden I then return the pivot table to the exact state it was in before I recorded the macro and run the exact code that was recorded...

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