Auto hide and unhide an entore selction of rows

wlj777

New Member
Joined
Nov 2, 2017
Messages
5
Hi, I have a task which I am having trouble finding a solution.

I have an worksheet (B) which is populated by data from another worksheet (A)

The data in sheet A is put into a number of different tables in sheet B based on a particular value (in this case if the data is weekly, monthly, quarterly.....etc)

Say for example the 'weekly table' in sheet B is made up of 10 rows, but only 2 rows have been updated and populated with data from sheet A, I want the remaining 8 rows to be hidden in that table.

But if data from sheet A now has 3 rows of weekly data, then I want that to updated in sheet B and therefor 3 rows are visible and 7 rows are hidden in the respective weekly table.

I hope that makes sense.
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Place in SHEET module (right-click on sheet tab \ View Code \ paste in code window)

Before you add further rows to the table run this (amend table name):
Code:
Sub TableRowsHide()
   Me.Range("Table1").Rows.Hidden = True
End Sub

To reveal all rows:
Code:
Sub TableRowsShow()
   Me.Range("Table1").Rows.Hidden = False
End Sub


VBA Hides \ Shows all rows except title row
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,908
Messages
6,175,305
Members
452,633
Latest member
DougMo

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