I have a pivot table referencing a large database (20,000-30,000 rows) that pulls the results for a test my company provides. There can be anywhere from 1-15 rows within this database that correspond to a single client - the pivot counts each of them, categorizes them, and collapses everything into a single row. I have another table which references this pivot, converting the counts into some meaningful text, which is then referenced by another pivot, from which I pull my final results. Long story shorty, I'm set to hand this task off to another of my coworkers soon (woohoo!), but want to make the process a little less technical, as said coworker isn't as fluent in excel as I am.
I've been trying to create a macro that reads the number of rows in a pivot table and expands the table referencing it to match its dimensions. Honestly, VBA is new to me and I have slightly more than zero experience in programming, so any efforts I've made so far have been seemingly fruitless.
How do I count the rows in the pivot?
Once I've done that, how do I expand the referencing table dimensions to match the count?
Finally, how do I make sure the formulas included in the referencing table are included in the new rows?
I attached an example of the setup I'm using, simplified & with stock data. Hopefully I provided enough information, but don't hesitate to ask for clarification!