Adicionar campos calculados, ao invés de inserirmos colunas adjacentes a Tabela Dinâmica, facilita a análise e a torna mais prática.
Sub AddCalculatedField()
'PURPOSE: Add a calculated field to a pivot table
'SOURCE: www.TheSpreadsheetGuru.com
Dim pvt As PivotTable
Dim pf As PivotField
'Set Variable to Desired Pivot Table
Set pvt = ActiveSheet.PivotTables("PivotTable1")
'Set Variable Equal to Desired Calculated Pivot Field
For Each pf In pvt.PivotFields
If pf.SourceName = "Inflation" Then Exit For
Next
'Add Calculated Field to Pivot Table
pvt.AddDataField pf
End Sub
Veja outros códigos:
Série DONUT PROJECT 2021
Série DONUT PROJECT 2018
Série DONUT PROJECT 2015
Série DONUT PROJECT 2014
Clique aqui e nos contate via What's App para avaliarmos seus projetos
Envie seus comentários e sugestões e compartilhe este artigo!
brazilsalesforceeffectiveness@gmail.com


Nenhum comentário:
Postar um comentário