Skip to content

Latest commit

 

History

History
55 lines (39 loc) · 1.34 KB

Excel.pivotvaluecell.md

File metadata and controls

55 lines (39 loc) · 1.34 KB
title keywords f1_keywords ms.assetid ms.date ms.localizationpriority
PivotValueCell object (Excel)
vbaxl10.chm917072
vbaxl10.chm917072
1857160d-9eab-d026-ef7d-af6187c6490e
03/30/2019
medium

PivotValueCell object (Excel)

Provides a way to expose values of cells in the case that actual cells (Range objects) are not available.

Example

This code sample uses the PivotValueCell property to test whether the value of one cell in a PivotTable is greater than another cell.

Sub TestEquality()
Dim X As Double
Dim Y As Double

'This code assumes that you have a Standalone PivotChart on one of the worksheets.
X = ThisWorkbook.PivotTables(1).PivotValueCell(1, 1).Value
Y = ThisWorkbook.PivotTables(1).PivotValueCell(1, 2).Value

If X > Y Then
MsgBox "X is greater than Y"
Else
MsgBox "Y is greater than X"
End If
End Sub

Methods

Properties

See also

[!includeSupport and feedback]