ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Pivot Tables and Cells.Find (https://www.excelbanter.com/excel-programming/337124-pivot-tables-cells-find.html)

[email protected]

Pivot Tables and Cells.Find
 
I have a table of data that I have a macro creating a pivot table out
of. I select a cell out of the row titles but it shows the cell value
is "". I even tried cells.find to look for the word but that doesn't
find the cell I am looking for. Manually I can do it and find the cell
or click on it and see the value but when I run the macro it doesn't
see the values. I have even tried copying the whole table and pasting
values so it doesn't see it as a pivot table anymore. Any help is
appreciated.

Thanks


Kanan

Pivot Tables and Cells.Find
 
I guess you are looking for field names. DId you try the PivotField object?

Kanan

" wrote:

I have a table of data that I have a macro creating a pivot table out
of. I select a cell out of the row titles but it shows the cell value
is "". I even tried cells.find to look for the word but that doesn't
find the cell I am looking for. Manually I can do it and find the cell
or click on it and see the value but when I run the macro it doesn't
see the values. I have even tried copying the whole table and pasting
values so it doesn't see it as a pivot table anymore. Any help is
appreciated.

Thanks



[email protected]

Pivot Tables and Cells.Find
 
No I haven't...do you have an example of the PivotField object?


Kanan

Pivot Tables and Cells.Find
 
Here is one:

Sub CheckDataField(collabel As String)
Set pvtTable = ActiveChart.PivotLayout.PivotTable

For Each pvtField In pvtTable.DataFields
If Left(pvtField.Name, 5) = "Count" Then
With ActiveChart.PivotLayout.PivotTable.PivotFields("Co unt of Value")
.Caption = collabel
.Function = xlSum
End With
End If
If Left(pvtField.Name, 3) = "Sum" Then
With ActiveChart.PivotLayout.PivotTable.PivotFields("Su m of Value")
.Caption = collabel
End With
End If
Next pvtField

End Sub

---------------------------------------------------------------
if you need to check individual values for any of the Pivot field, then use
the
pivotitem object.

Good Luck
Kanan



" wrote:

No I haven't...do you have an example of the PivotField object?




All times are GMT +1. The time now is 10:38 PM.

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