Very similar, its some tracking codes for various activities (this example is kind of a made up scenario that I was testing with, but the end format is the same).
We are performing some manipulation/analysis on the raw numbers outside of the tracking database, so I don't need the original formulas to pull through with it. This is more for manually adding projections later on.
I have gotten far enough using For loops and a helper column added in Column A (pushing everything right to start at column B) to assign a hierarchy number to each row (1 being largest subtotal group which then rolls up all the 2 subtotals below that which roll up all the 3 subtotals before that and finally the level 4 raw data rows below the 3).
This has allowed me to properly color the lines, but now I need to figure out how to count (in a big nested loop i imagine) from the first row which has a 1 in column, offset down one row, and then select everything until I hit the next 1 in column A and then group (the group part is easy, its the code to figure out what my selection between group levels that I'm stuck on).
EDIT:
Trying to use a for, if, and do until loop to basically run down the rows until it finds a "1" in column A. Then I want it to look at the next row and see if column A has a "1" and if not, select the current column A cell and move to the next row. Do this until it finds a "1" in column A again (the Do Until) and then take the row address of the last selected cell that didn't have a "1" in column A. Then select all rows from the first row that it found "1" in column A all the way to one row above the next row that it found with "1" in column A.
Code looks like that (was just trying to get it to select for now and then group if it worked) but it seems to loop forever and freeze up.
I should note I have taught myself little to nothing about error avoidance and infinite loops and such yet, but this seems to be one of those instances.
Thanks,
Bookmarks