Relative Content

Tag Archive for excelvbapivot-table

Analyzing misaligned rows in Excel in a Pivot Table

I have a recurring dataset which consists of two lists of document counts by source and date. I need to compare the totals and identify any discrepancies. A pivot table works well for this purpose when the sources and dates match. However, the dataset does not include zero values – if a given source and date has no documents, that row is not included. This results in the two lists being of unequal column length and the pivot table fails to compare the correct rows.

How to get ID of MAX value?

I’m new to Excel and its VBA object model.
I have this table (A-D) sorted by A & B. For each A-B group of rows, I want to find the MAX D (Cost) value, and C (Sale-ID) of this max value. Like the smaller table (F1:J4). I mucked around with a pivot table, but can’t get the Sale-ID. [Ignore the formatting, added for ease of reading]

VBA code to exclude items in filter on a pivot table filter

I am relatively new to VBA. I can’t find a code to exclude items in a filter on a pivot table filter. I am currently trying this but I get always get an error with the filter. For this one I get an error 1004 “Unable to get the Pivotfields property of the pivottable class”. Ideally I would also like to add a function that first selects all items in the filter then excludes multiple items.

VBA code to exclude items in filter on a pivot table filter

I am relatively new to VBA. I can’t find a code to exclude items in a filter on a pivot table filter. I am currently trying this but I get always get an error with the filter. For this one I get an error 1004 “Unable to get the Pivotfields property of the pivottable class”. Ideally I would also like to add a function that first selects all items in the filter then excludes multiple items.