Currently I have a pivot table set up to show the top 1 of dates in the table. My question is, is there a way to filter the table to show the top 2 of dates if one of the value fields in the pivot table is empty using vba.
For example if the pivot table usually shows the top 1 of dates, if the pivot field "Fruit" is empty show the top 2 of dates instead.
I am using the pivot table to make calculations and if the sheet shows the top 1 of dates and the pivot field "Fruit" is empty, I am getting an error because it contains no value. In order to fix this I need to have it take the value in "Fruit" that is contained in the top 2 of dates instead.
Thanks in advance.
For example if the pivot table usually shows the top 1 of dates, if the pivot field "Fruit" is empty show the top 2 of dates instead.
I am using the pivot table to make calculations and if the sheet shows the top 1 of dates and the pivot field "Fruit" is empty, I am getting an error because it contains no value. In order to fix this I need to have it take the value in "Fruit" that is contained in the top 2 of dates instead.
Thanks in advance.