Skip to content

Files

Latest commit

 

History

History
52 lines (30 loc) · 1.4 KB

Excel.PivotItem.StandardFormula.md

File metadata and controls

52 lines (30 loc) · 1.4 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
PivotItem.StandardFormula property (Excel)
vbaxl10.chm246092
vbaxl10.chm246092
Excel.PivotItem.StandardFormula
34410ff5-0330-f685-e508-94084e6f0e5d
05/07/2019
medium

PivotItem.StandardFormula property (Excel)

Returns or sets a String specifying formulas with standard English (United States) formatting. Read/write.

Syntax

expression.StandardFormula

expression A variable that represents a PivotItem object.

Remarks

The StandardFormula property primarily affects item names with date or number formatting. It provides a way to specify or query a formula for a given calculated item.

The StandardFormula property is "international-friendly" whereas the Formula property is not.

Example

This example adds 10 to the Decimals field and displays it as a calculated item in the data field. The example assumes that a PivotTable exists on the active worksheet and that a field titled Decimals exists in the data table.

Sub UseStandardFormula() 
 
 Dim pvtTable As PivotTable 
 Set pvtTable = ActiveSheet.PivotTables(1) 
 
 ' Change calculated field of decimals by adding '10'. 
 pvtTable.CalculatedFields.Item(1).StandardFormula = "Decimals + 10" 
 
End Sub

[!includeSupport and feedback]