GTretick
Member
I am designing an income statement in excel. One of the features I would like it to do is to be able to drill down into the detail of the category.
I have attached a simple dummy partial income statement for discussion and perhaps modification by a replier to get me started.
In my example I have two expense categories: Advertising and Office. Each of these can be expanded into three sub-categories and these in turn can be expanded into two or three "micro-categories".
I would like to be able to start with a rolled up statement for a clean look. As I need to look into an anomaly, I would like to expand that category to the sub-category and again to the micro-category.
Opening one sub or micro-category should not automatically open all of the other sub or micro-categories. They should be able to collapse nicely as well.
Using the hide and unhide command helps but it is both clunky and when unhiding from the collapsed view, gives ALL the detail rather than a true drill down.
The grouping command is also an alternative I have explored but nesting them was frustrating with how thing were spaced on the sheet as well as it starts to eat into my screen space as the left hand sidebar keeps expanding with each nest. (my finished product potentially could contain more than two nests).
I believe my answer lies in a macro that hides rows based on certain conditions. I am not very good in VBA however so I would need a kick start. I could probably figure out how to amend the code for wider application after that.
If anybody can come up with a some code or another eloquent solution I (and probably several other accountants) would be grateful to see your solution. I am flexible to change layout a bit if that is necessary.
Thanks.
I have attached a simple dummy partial income statement for discussion and perhaps modification by a replier to get me started.
In my example I have two expense categories: Advertising and Office. Each of these can be expanded into three sub-categories and these in turn can be expanded into two or three "micro-categories".
I would like to be able to start with a rolled up statement for a clean look. As I need to look into an anomaly, I would like to expand that category to the sub-category and again to the micro-category.
Opening one sub or micro-category should not automatically open all of the other sub or micro-categories. They should be able to collapse nicely as well.
Using the hide and unhide command helps but it is both clunky and when unhiding from the collapsed view, gives ALL the detail rather than a true drill down.
The grouping command is also an alternative I have explored but nesting them was frustrating with how thing were spaced on the sheet as well as it starts to eat into my screen space as the left hand sidebar keeps expanding with each nest. (my finished product potentially could contain more than two nests).
I believe my answer lies in a macro that hides rows based on certain conditions. I am not very good in VBA however so I would need a kick start. I could probably figure out how to amend the code for wider application after that.
If anybody can come up with a some code or another eloquent solution I (and probably several other accountants) would be grateful to see your solution. I am flexible to change layout a bit if that is necessary.
Thanks.