I want to show detail of the values based on criteria appearing in my pivot table in a separate worksheets. Below is what I have so far, which shows the details for all items.
below is pivot snapshot, I want macro to refer to the last 2 columns (.i.e. Column D and E) and if the values in both columns match then macro should show the details of both the values in one worksheet (or in separate worksheet is also fine) and where it doesn't match it should not show details and loop through the cells of both the columns till the pivot end. Excel version used by me is excel 2010.Code:Sub MakeReports() Dim c As Range With ActiveSheet.PivotTables(1) For Each c In .DataBodyRange.Resize(, 1) c.ShowDetail = True Next c End With End Sub




Reply With Quote
