Hi Ninja
i want to copy data from pivot table to my MIS sheet bases on filter condition. below is a piece of code i prepared ,
Here by i attached my file . I want to select ColumnRange + DataBodyRange without last row and last column and paste in MIS sheet
please help and thank in advance
i want to copy data from pivot table to my MIS sheet bases on filter condition. below is a piece of code i prepared ,
Here by i attached my file . I want to select ColumnRange + DataBodyRange without last row and last column and paste in MIS sheet
please help and thank in advance
Code:
Sub Macro1()
Sheets("sheet1").Select
Dim pt As PivotTable
Set pt = ActiveSheet.PivotTables(1) 'Sheets("sheet1").Select
ActiveSheet.PivotTables("PivotTable1").PivotFields("DB_Summery").ClearAllFilters
ActiveSheet.PivotTables("PivotTable1").PivotFields("DB_Summery").CurrentPage = "Pillar 1"
pt.ColumnRange.Resize(pt.ColumnRange.Rows.Count + 5, pt.ColumnRange.Columns.Count - 1).Select
Selection.Copy
Sheets("MIS").Select
Range("F9").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
[\code]