Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Easy way to show 3 groupings in Excel

Posted on 2013-12-03
6
Medium Priority
?
176 Views
Last Modified: 2013-12-09
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
Comment
Question by:daisypetals313
6 Comments
 
LVL 23

Expert Comment

by:NBVC
ID: 39693918
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
 
LVL 39

Expert Comment

by:nutsch
ID: 39693966
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
 

Author Comment

by:daisypetals313
ID: 39694000
Does anyone know what macro code would do this?
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 39

Accepted Solution

by:
nutsch earned 2000 total points
ID: 39694080
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
 
LVL 4

Expert Comment

by:andrew_man
ID: 39694232
Add a vba button and use the above code
0
 

Author Closing Comment

by:daisypetals313
ID: 39706293
Thank you.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes a serious pitfall that can happen when deleting shapes using VBA.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

971 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question