ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Logic to Determine if a Data Pivot Field Exist? (https://www.excelbanter.com/excel-programming/293481-logic-determine-if-data-pivot-field-exist.html)

ExcelMonkey[_103_]

Logic to Determine if a Data Pivot Field Exist?
 
Is there a way that you can tell whether or not a Data Pivot Fiel
exists in a pivot table. For example, I want to remove a Data Pivo
Field item IF it exists in a pivot table. When I record the removal o
this item I get:

Range("C7").Select
ActiveSheet.PivotTables("Data1").AddFields RowFields:="Quarter"
ActiveSheet.PivotTables("Data1").PivotFields("Aver age of Seed 1"). _
Orientation = xlHidden

If its not there in the first place I cannot remove it in code. I wan
to be able to say if Data1 exists in the Data Pivot Field, then remov
it, otherwise do nothing.

Thank-yo

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



All times are GMT +1. The time now is 11:18 AM.

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