Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 178
  • Last Modified:

Easy way to show 3 groupings in Excel

I have three sets of grouping on my sample file attached.  If I click 1or 2 (at top right) then either all groups expand or close up.  Is there a way to have numbers 1, 2, 3 up top and clicking on each number will expand just one of the sections?
Book1.xlsx
0
daisypetals313
Asked:
daisypetals313
1 Solution
 
NBVCCommented:
I don't think so, but you can easily just click the + sign above the group you want to expand, then click the - sign to contract it...
0
 
nutschCommented:
Just like he said, but you could build a macro that would expand / collapse the currently selected group and code it to buttons marked 1, 2, and 3.

Thomas
0
 
daisypetals313Author Commented:
Does anyone know what macro code would do this?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
nutschCommented:
You can use something like this:

If ActiveCell.EntireColumn.ShowDetail Then
   ActiveCell.EntireColumn.ShowDetail = False
Else
    ActiveCell.EntireColumn.ShowDetail = True
End If

Open in new window


Thomas
0
 
andrew_manCommented:
Add a vba button and use the above code
0
 
daisypetals313Author Commented:
Thank you.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now