Excel 2010: Grouping & hiding rows using a macro

NPetersen

New Member
Joined
Nov 14, 2013
Messages
13
Hello,

I have approximately 40 worksheets which have a table with an identical format but contain varying data results.

In each worksheet I need to hide a specific set of rows, but the set of rows I would like to target could be one of four combinations. To start, is it possible to create a macro which will hide a specified set of rows (ie. Rows 17:31, Rows 42:61, Rows 67:86)? I should be able to edit the VBA for the new row sets, but don't know how to get that starting point.

Two additional related improvements to the code (wishlist):
  • What changes can be made to this VBA for it to toggle the "hidden/unhidden" status of the selected rows?
  • Using either a list on a seperate worksheet called "SSU Table Listing" or through a userform, can I specify multiple worksheets for the VBA to be applied to with the single run of the original macro?

Thank you in advance for your help!

N
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.

Forum statistics

Threads
1,216,126
Messages
6,129,004
Members
449,480
Latest member
yesitisasport

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