Get the Cell object by DisplayName of PivotField of PivotTable

Get the Cell object by DisplayName of PivotField of PivotTable

The following code accesses the first pivot table of the worksheet and then gets the cell by the display name of the second data field of the pivot table. It then changes the fill color and font color of the cell to light blue and black, respectively. The screenshots below show how the pivot table looks before and after the code execution.

Pivot Table - Before

todo:image_alt_text

Pivot Table - After

todo:image_alt_text