ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Using VB to change a defined formula within a pivottable (https://www.excelbanter.com/excel-programming/417512-using-vbulletin-change-defined-formula-within-pivottable.html)

Mark Parent

Using VB to change a defined formula within a pivottable
 
I have a pivottable and several formula defined, which is working well
enough, but I'd like to change a formula based on a selection within the
pivottable. My problem is the coding to change the formula. I'm using

Worksheets("RESL Cashflow").PivotTables("1MainRESLCashflow"). _
PivotFormulas("RESLRetention").StandardFormula =
"=RESLOpening$^12"

where "RESL Cashflow" is the name of the sheet, "1MainRESLCashflow" is the
name of the pivottable, and "RESLRetention" is the name of the calculated
field. Am I using the wrong Method?




All times are GMT +1. The time now is 07:39 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com