TheWennerWoman
Active Member
- Joined
- Aug 1, 2019
- Messages
- 301
- Office Version
- 365
- Platform
- Windows
Hello,
I hope someone can help; I'm sure this is fairly straightforward but I'm not that far along the VBA learning curve so please forgive me if this seems like a stupid question.
I have an Excel pivot table. I need to use VBA to add certain calculations to the far right of it (the spreadsheet is being used by people who just want to refresh it). However, the pivot table columns are months and so what works now won't work in November because there will be more columns.
The formula I am looking to add in is
and so on down the page.
This is currently going into X2. W2 is labelled PCT Total, L2 is labelled KPI Total.
Next month, however, the formula will be
and this will go into Y2.
So it's a constantly moving picture.
Any help greatly appreciated.
I hope someone can help; I'm sure this is fairly straightforward but I'm not that far along the VBA learning curve so please forgive me if this seems like a stupid question.
I have an Excel pivot table. I need to use VBA to add certain calculations to the far right of it (the spreadsheet is being used by people who just want to refresh it). However, the pivot table columns are months and so what works now won't work in November because there will be more columns.
The formula I am looking to add in is
Code:
=IFERROR(W2/L2,"")
and so on down the page.
This is currently going into X2. W2 is labelled PCT Total, L2 is labelled KPI Total.
Next month, however, the formula will be
Code:
=IFERROR(X2/M2,"")
and this will go into Y2.
So it's a constantly moving picture.
Any help greatly appreciated.
Last edited: