Hi there,

So I'm essentially trying to replicate this pivot table function in a regular table populated using VBA: https://support.office.com/en-us/art...0-0cf0b9b880f7

Imagine this: A pivot table with months as rows and race as columns, with counts of people in the cells. Some racial groups are disaggregated (e.g. Asian - Korean, Asian - Chinese, Asian- Indian) meaning that each sub-group gets its own column for counts. I want to be able to collapse them back up to the larger aggregated racial group (i.e. "Asian"). This was super simple in pivot tables, and users are able to just hit the + or - to aggregate or disaggregate with automatic sub-totals.

For a completely separate reason, I can't use pivot tables and am relying on VBA to populate and edit regular tables. Is it possible to replicate this aggregate/disaggregate functionality using VBA?

Thanks in advance!