For a Pivotchart, I currently use the following code to move a certain value always on top of the chart. Now I would like to use the same for moving another value to the second to last entry (one underneath the very top one).
I've tried something like ".PivotItems(letzterbalken_RC_green).Position = .PivotItems.Count - 1", but I guess the syntax is wrong. Any ideas?
green = Worksheets("Sheet1").Range("C134").Value
With ActiveSheet.PivotTables("PivotTable1").PivotFields("Planungsart")
.PivotItems(green).Position = .PivotItems.Count
End With