I have a "master" data set that aggregates data from multiple other tabs. The other tabs are updated monthly with new information then the master pulls in the relevant fields from each and allows me to summarize on other tabs further along in the process. Part of the aggregation process starts with one of the tabs, adds a few columns to create unique ID that didn't previously exist in the source data, and then pulls in so corresponding values from the other tables. In the summary tabs, I'm using sumifs to pull in all data that matches 3 different criteria from the master tab. The problem is that once I build out the sumifs formulas, pointing at the Master tab, when I run a macro to update the master tab each month, it deletes all of the data in the tab, copies over a template from another tab, inserts a few columns, and add various calculations. Each time the columns are added by the macro, the references in the sumifs shift and therefore point at the incorrect columns. Thoughts?
Here is the formula working, followed by the formula after the 2 columns are inserted when the macro is run:
Before: SUM(SUMIFS('Master All Data'!$AQ:$AQ,'Master All Data'!$I:$I,'21010'!$H24,'Master All Data'!$P:$P,'21010'!$B$2,'Master All Data'!$M:$M,{"v0310","V0315","V0320"}))
After: SUM(SUMIFS('Master All Data'!$AS:$AS,'Master All Data'!$K:$K,'21009'!$H23,'Master All Data'!$R:$R,'21009'!$B$2,'Master All Data'!$O:$O,{"v0310","V0315","V0320"})) - Everything shifted 2 columns.
Bookmarks