Grouping Multiple Rows

bark01

Board Regular
Joined
Sep 6, 2006
Messages
123
Hi guys,

Not sure if this is possible or not, but is there a way to group multiple groups of rows into one group.

Ie. I could have rows A-C and T-V in one group so I could hide/show detail for multiple rows with one click ?

thanks.
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.

Mark F

Well-known Member
Joined
Jun 7, 2002
Messages
500
Not sure whether you mean manually or via code

If manually, Highlight all of the rows you want in a group, the do Data, Group and Outline, Group

Apologies if this isn't what you need

Mark:)
 

jasonb75

Well-known Member
Joined
Dec 30, 2008
Messages
14,761
Office Version
  1. 365
Platform
  1. Windows

jasonb75

Well-known Member
Joined
Dec 30, 2008
Messages
14,761
Office Version
  1. 365
Platform
  1. Windows

ADVERTISEMENT

I stand corrected , never noticed it in the older versions, but that's possibly as I never personally had a need for it then.

Thanks for the correction.
 

bark01

Board Regular
Joined
Sep 6, 2006
Messages
123
Not sure whether you mean manually or via code

If manually, Highlight all of the rows you want in a group, the do Data, Group and Outline, Group

Apologies if this isn't what you need

Mark:)

I get the same message,' the command you chose can not be used with multiple sections'.

im using excel xp sp2 (2003)
 

jasonb75

Well-known Member
Joined
Dec 30, 2008
Messages
14,761
Office Version
  1. 365
Platform
  1. Windows
I get the same message,' the command you chose can not be used with multiple sections'.

im using excel xp sp2 (2003)


This is where the code I linked to becomes an advantage, the code in the thread can be adapted to hide anything you like.

Your original post asked about hiding rows but gave column references, so not entirely sure which you're looking for, but try these on a COPY of your workbook.
Code:
Sub hiderows()
   If Range("1:3,20:23").EntireRow.Hidden = False Then
    Range("1:3,20:23").EntireRow.Hidden = True
   Else: Range("1:3,20:23").EntireRow.Hidden = False
  End If
End Sub
Code:
Sub hidecolumns()
If Range("A:C,T:V").EntireColumn.Hidden = False Then
    Range("A:C,T:V").EntireColumn.Hidden = True
   Else: Range("A:C,T:V").EntireColumn.Hidden = False
  End If
End Sub

Hope this helps
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,641
Messages
5,832,830
Members
430,171
Latest member
Ashish7860

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
Top