VBA - Hide/Unhide Blank Rows in a Range & Hide/Unhide Worksheets based on cell comparison

surecant

New Member
Joined
Mar 3, 2014
Messages
7
Hello,

I would like to apologize off the top. I'm a newbie when it comes to macros and do not understanding the coding, so bare with me.

I would like to create 2 macros:

#1: Hide/Unhide rows 24:33, 61:72, 102:107, & 115:124 based on if the corresponding "B" cell is blank (hide) or not blank (unhide). This is only on worksheet "Information".

#2. Hide/Unhide worksheets "GL#1, GL#2,...,GL#14" based on their cell "D12" value if >= (hide) worksheet "Information" cell "E44" value, unhide if <= the said cell values.

Hopefully this isn't all that challenging. Please let me know if you need more info.

Cheers!
 

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.
Will you run the macro manually or should it run everytime theres an worksheet change?
 
Upvote 0
Will you run the macro manually or should it run everytime theres an worksheet change?

I want both macros to run every time there is a change to worksheet "Information" cell "E44".

Also, do i need the same macro for each worksheet, or will the code for worksheet "Information" suffice for all the subsequent sheets...if that makes sense.

Thanks!
 
Upvote 0

Forum statistics

Threads
1,223,164
Messages
6,170,444
Members
452,326
Latest member
johnshaji

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