This is going to be hard to explain, but here goes.
For any of you that are familiar with PeopleSoft, chartfields are organized into "trees". Think of this as basically a file structure where you have a parent folder (node) and under that folder you have either additional folders or detail level values (leaves). I am able to copy the tree from PeopleSoft and paste it into Excel. Once in Excel, I determined that the levels of the items in the tree were denoted by leading spaces before the text. Therefore, if a node had three leading spaces, then the items within that node would have four leading spaces. Using some code that I got here from Rick Rothstein I was able to translate the leading spaces into semi-colons and then using text to columns, I can distribute the information in a manner that makes it easy to see where the rollups are. Here's where the problem comes in. Now I want to group the data so that the detail rolls up to the parent node and then that node rolls up to its parent as well. I have no idea how to accomplish this in code and manually performing this is very time consuming.
My only thought would be to note which column is the first column with data on each row. Let's say that at the bottom, the first column with data was column D. D would equate to a 4. The macro could then go up until it finds a number less than 4, its parent, and then group those lines up to the parent row. It would keep going up the rows, grouping lower numbers into higher numbers until it reached the top. The macro would have to make a couple of passes though, because at some point, all the 3's would need to roll up to a 2 and so on.
Although in theory something like I mentioned might work, it seems very clunky to me (and I don't even know what I'm doing) so hopefully there is a simpler method that would work that I'm not aware of. Any help anyone would give would be appreciated. I'd be more than happy to email a portion of this spreadsheet to anyone willing to give it a try. I'm including a very simplistic excerpt below. The actual file has about 2,000 rows and data is in 12 columns.
[TABLE="width: 500"]
<tbody>[TR]
[TD][TABLE="width: 19"]
<tbody>[TR]
[TD]INF_TECHNOLOGY[/TD]
[/TR]
</tbody><colgroup><col></colgroup>[/TABLE]
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]IT_BUS_INTELLIGENCE[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]1206305000[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]1601010310[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]IT_VOICE_TELECOM[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]1206040600[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]IT_INTERNET_PROJECT[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]1206100000[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]1601060000[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]PC_SYS_IMPLEMENT[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]1206090000[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]INFORMATION_TECH[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]1201060000[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]1201060111[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]1201060333[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]1201060555[/TD]
[/TR]
</tbody>[/TABLE]
For any of you that are familiar with PeopleSoft, chartfields are organized into "trees". Think of this as basically a file structure where you have a parent folder (node) and under that folder you have either additional folders or detail level values (leaves). I am able to copy the tree from PeopleSoft and paste it into Excel. Once in Excel, I determined that the levels of the items in the tree were denoted by leading spaces before the text. Therefore, if a node had three leading spaces, then the items within that node would have four leading spaces. Using some code that I got here from Rick Rothstein I was able to translate the leading spaces into semi-colons and then using text to columns, I can distribute the information in a manner that makes it easy to see where the rollups are. Here's where the problem comes in. Now I want to group the data so that the detail rolls up to the parent node and then that node rolls up to its parent as well. I have no idea how to accomplish this in code and manually performing this is very time consuming.
My only thought would be to note which column is the first column with data on each row. Let's say that at the bottom, the first column with data was column D. D would equate to a 4. The macro could then go up until it finds a number less than 4, its parent, and then group those lines up to the parent row. It would keep going up the rows, grouping lower numbers into higher numbers until it reached the top. The macro would have to make a couple of passes though, because at some point, all the 3's would need to roll up to a 2 and so on.
Although in theory something like I mentioned might work, it seems very clunky to me (and I don't even know what I'm doing) so hopefully there is a simpler method that would work that I'm not aware of. Any help anyone would give would be appreciated. I'd be more than happy to email a portion of this spreadsheet to anyone willing to give it a try. I'm including a very simplistic excerpt below. The actual file has about 2,000 rows and data is in 12 columns.
[TABLE="width: 500"]
<tbody>[TR]
[TD][TABLE="width: 19"]
<tbody>[TR]
[TD]INF_TECHNOLOGY[/TD]
[/TR]
</tbody><colgroup><col></colgroup>[/TABLE]
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]IT_BUS_INTELLIGENCE[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]1206305000[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]1601010310[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]IT_VOICE_TELECOM[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]1206040600[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]IT_INTERNET_PROJECT[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]1206100000[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]1601060000[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]PC_SYS_IMPLEMENT[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]1206090000[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]INFORMATION_TECH[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]1201060000[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]1201060111[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]1201060333[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]1201060555[/TD]
[/TR]
</tbody>[/TABLE]