ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Help with Pivots (.Pivot Items) - Excel 97 (https://www.excelbanter.com/excel-programming/289728-help-pivots-pivot-items-excel-97-a.html)

JonWalton

Help with Pivots (.Pivot Items) - Excel 97
 
Need help with the following situation:

I have a pivot table based on a series of months
(Format of source data = Jan-04 etc)

The problem is that I want to be able to hide months using a macr
depending on a month selection... e.g. the macro finds startmont
(01/01/2000 say) - then "hides" in the pivot all months earlier tha
this.

I'm trying to use something similar to this code....

checkmonth = "01/01/2003"

with activesheet.pivottables("pivottable1").pivotfields ("Month")
.pivotitems(checkmonth).visible = false
end with

There is a loop to change the value of checkmonth, which I've "dimmed
as a date. The problem is that it can't "find" the month in the pivo
table to hide it. I can only assume the date link isn't working....?

Do you need any more info? Please help! It's driving me nuts

--
Message posted from http://www.ExcelForum.com



All times are GMT +1. The time now is 04:33 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com