Help with auto Hide/Unhide rows without rerunning VBA

RDM1126

New Member
Joined
Jun 7, 2022
Messages
4
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Hello, my name is Ryan,

I've been using different codes to accomplish hiding rows on my sheet, which work but as I go along, and the cell changes it does not unhide rows like I thought it would.

I have a safety meeting data on a spreadsheet, one sheet (Safety Meeting 101) is an interactive data sheet in which someone would fill out and present the meeting from

I have data on this sheet from A4 to O242, as you fill out the sheet and select yes from a drop down in each section, I have formulas in column N4:N242 that either say Hide or Unhide in each cell based on the yes

responses, which unhides the next section while hiding the just completed section. This is so the person doing the meeting does not need to scroll to complete the meeting. The data in column O are hide/unhide as well.

but not every cell O4 - O242 just a few here and there for the different sections if the data is blank for it to hide the row in that section.


My problem is I can get the VBA code to hide or unhide, but I have to run the Macro each time, I'm looking for something that, as the Hide/Unhide changes, the VBA code will run and automatically and Hide or Unhide

the rows, I also have the 2nd set of Hide/Unhide in cells O54 to O83, O95 to O104, O106 to O115, O117 to O126, O129 to O149, O153 to O187, and O196 to O225, again I want these to be automatic as well but more if

the corresponding N column say Unhide (N54 = "Unhide" and O54 = "Hide") I want it to hide. Would also like to be able to protect the sheet and still have the hide unhide work.

Also was wondering if you can put different VBA codes in the same module as the hidden rows above but I also need to add for hiding and unhiding sheets, I have that code, but can it all go on the same VBA page? if
so how?
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce

Forum statistics

Threads
1,223,214
Messages
6,170,771
Members
452,353
Latest member
strainu

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