Grouping Multiple Rows

bark01

Board Regular
Joined
Sep 6, 2006
Messages
135
Office Version
  1. 365
Platform
  1. Windows
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

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
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:)
 
Upvote 0
Upvote 0
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.
 
Upvote 0
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)
 
Upvote 0
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
 
Upvote 0

Forum statistics

Threads
1,218,786
Messages
6,144,495
Members
450,549
Latest member
desperato

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