subtotal like

Z

zekni

Hello,

i saw a spreadsheet where they collumns could be collapsed as if they used subtotals with a plus or a minus.

Subtotals open enclose vertically, here they open en close vertically and there is no reason for a subtotal.

How could they do it.

Tnx
 
G

Guest

Select your data range you would like to group. On the menu bar select Data--
If u change the way u look @ things, the things u look at change.
 
D

David McRitchie

Hi zekni,

To hide/unhide certain columns then
Select column(s), Format, Columns, Hide/unhide column

You can record a macro, put the code into an event macro and
toggle the hiding or unhiding of columns with a double-click event.

Example:

Private Sub Worksheet_BeforeDoubleClick(ByVal _
Target As Range, Cancel As Boolean)
'to install -- right-click on the sheet tab of the sheet to
' be used in and choose 'view code'. Paste this Worksheet
' event macro into the module. 2007-05-11 misc
'http://www.mvps.org/dmcritchie/excel/event.htm
Cancel = True 'get out of entry mode
If Range("A1").Interior.ColorIndex < 0 Then
Range("B:B,D:E,H:H").EntireColumn.Hidden = True
Range("A1").Interior.ColorIndex = 35
Else
Cells.EntireColumn.Hidden = False
Range("A1").Interior.ColorIndex = -1
End If
End Sub

Since I don't know how to test to see if any columns are hidden
I changed the interior color of cell A1, there would be ways of
being less conspicuous, but thought maybe the fact that it
is conspicuous might be helpful.

--



Hello,

i saw a spreadsheet where they collumns could be collapsed as if they used subtotals with a plus or a minus.

Subtotals open enclose vertically, here they open en close vertically and there is no reason for a subtotal.

How could they do it.

Tnx
 
D

David McRitchie

Hi zekni,
see answer in newsgroup, please post in plain text
not in HTML. You can see how HTML messed up
Google Groups archives, where the other replies show
"quoted text", and my reply doesn't even show
comment delimiters.

http://groups.google.com/groups?threadm=ucAcbT#[email protected]

Turning off MIME/HTM/RichTextFormat in Outlook Express
http://www.mvps.org/dmcritchie/excel/posting.htm#nomimeoe6

--
HTH,
David McRitchie, Microsoft MVP - Excel
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

all of the following should be preceded by a comment delimiter (">")
at the beginning of each line after the next line, which would be
the case had you posted in plain text.

Hello,

i saw a spreadsheet where they columns could be collapsed as if they used subtotals with a plus or a minus.

Subtotals open enclose vertically, here they open en close vertically and there is no reason for a subtotal.

How could they do it.

Tnx
 
Z

zekni

Thank you gentlemen

It works

Zekni

"zekni" <[email protected]> schreef in bericht Hello,

i saw a spreadsheet where they collumns could be collapsed as if they used subtotals with a plus or a minus.

Subtotals open enclose vertically, here they open en close vertically and there is no reason for a subtotal.

How could they do it.

Tnx
 
Z

zekni

Thank you.

It works

Zekni


"zekni" <[email protected]> schreef in bericht
Hello,

i saw a spreadsheet where they collumns could be collapsed as if they used
subtotals with a plus or a minus.

Subtotals open enclose vertically, here they open en close vertically and
there is no reason for a subtotal.

How could they do it.

Tnx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top