Expanding Groups is Unhiding Rows Previously Hidden

jewkes6000

Board Regular
Joined
Mar 25, 2020
Messages
55
Office Version
  1. 365
Platform
  1. Windows
I have groupings set up to expand and collapse groups of rows. However, I also want to be able to hide certain rows and keep them hidden when using the groups. What's happening is I will hide a row which is part of group, but then when I collapse and then expand that group, the previously hidden rows reappears. Is there a solution to this? Or is it just an Excel thing I have to deal with?

You can see in the images below that rows 226 and 227 have "hide" in the middle column, which makes these rows be hidden when I run a macro. However, when I collapse this grouping (shown in the other image), and then expand the grouping again, rows 226 and 227 reappear as shown in the first image, thus making me run my macro again to hide them.


1613669940034.png
1613669950676.png
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.

John_w

MrExcel MVP
Joined
Oct 15, 2007
Messages
6,745
I don't think there is a way to keep the rows hidden when you expand the group.

Instead of hiding the rows, a possible workaround is to create multi-level groups. Group the 'hide' rows first (with a macro), then group the other rows.
 

Watch MrExcel Video

Forum statistics

Threads
1,129,281
Messages
5,635,295
Members
416,851
Latest member
zeldadav

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