![]() |
Copy Columns from Excel Pivot Table in a Macro
Does anyone know how to select a column from a pivot table from a macro? I
would like to select a column that corresponds to an attribute of the horizontal fields. For example, I would like to specify a year as 2006 then copy the year no matter which column the data for 2006 is located. |
Copy Columns from Excel Pivot Table in a Macro
Dave,
Something along the lines of ActiveSheet.PivotTables("PivotTable1").PivotSelect "", xlDataAndLabel, True Selection.Find(What:="2006", LookAt:=xlWhole).EntireColumn.Copy The specific "What" to look for depends on your actual year values. HTH, Bernie MS Excel MVP "Dave" wrote in message ... Does anyone know how to select a column from a pivot table from a macro? I would like to select a column that corresponds to an attribute of the horizontal fields. For example, I would like to specify a year as 2006 then copy the year no matter which column the data for 2006 is located. |
All times are GMT +1. The time now is 12:31 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com