Here's the example of hierarchical data in a database:
Country | Region | Category | ProgramName | Details_1 | Details_2 | Details_3 |
USA | North | SchoolName | A | a1 | a2 | a3 |
USA | South | SchoolName | C | c1 | c2 | c3 |
Brasil | East | SchoolName | D | d1 | d2 | d3 |
Brasil | East | CollegeName | E | e1 | e2 | e3 |
Brasil | West | CollegeName | F | f1 | f2 | f3 |
I've created both class module "CTextTransposer" and module "TestTextTransposer" in Excel.
After running the TestTextTransposer macro and the results will be shown on Sheet1, starting from cell H10. I would like to seek your kind assistance for enhancing the pivot table with more data fields (highlighted in red below) and field name look like this:
Category | USA | Brasil | ||||||||||||||
North | South | East | West | |||||||||||||
ProgramName | Details_1 | Details_2 | Details_3 | ProgramName | Details_1 | Details_2 | Details_3 | ProgramName | Details_1 | Details_2 | Details_3 | ProgramName | Details_1 | Details_2 | Details_3 | |
SchoolName | A | a1 | a2 | a3 | C | c1 | c2 | c3 | D | d1 | d2 | d3 | ||||
CollegeName | E | e1 | e2 | e3 | F | f1 | f2 | f3 |
Attached is my working file for your easy reference. Any comments/suggestions would be much appreciated. Thanks!!