Macro expand and contract groups

Tashat

Board Regular
Joined
Jan 12, 2005
Messages
135
Office Version
  1. 365
Platform
  1. Windows
Hi All

I have a dashboard page as shown below in one of my sheets and I want to create a macro which I can assign to buttons or a cell which enables me to expand or contract the groups I've made. So for example if I click on "high level overview by workstream" as shown below, it opens the group to show all the rows before down to "Name 9". Likewise, if I click on "Organisation ranking" then it expands or contracts the rows below it down to "Low : 400" Can anyone help me to write a macro that can do this? I'm likely to have several more grouped sections on this page and I want it to act like a menu where someone can click to expand the section they want to look at. Many thanks in advance.

HIGH LEVEL OVERVIEW BY WORKSTREAM
WORKSTREAM 1WORKSTREAM 2WORKSTREAM 3WORKSTREAM 4WORKSTREAM 5WORKSTREAM 7WORKSTREAM 8WORKSTREAM 9WORKSTREAM 10WORKSTREAM 11SPARE WORKSTREAM 1SPARE WORKSTREAM 2SPARE WORKSTREAM 3SPARE WORKSTREAM 4SPARE WORKSTREAM 5SPARE WORKSTREAM 6SPARE WORKSTREAM 7SPARE WORKSTREAM 8
NameNumber of OrganisationsRAG Status for Each Workstream
NAME 1#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A
NAME 2#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A
NAME 3#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A
NAME 4#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A
NAME 5#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A
NAME 6#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A
NAME 7#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A
NAME 8#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A
NAME 9#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A
ORGANISATION RANKING
Top 5089
High50
Medium109
Low400
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

Forum statistics

Threads
1,217,390
Messages
6,136,320
Members
450,005
Latest member
BigPaws

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top