Hide Show rows based on cell value true or false using VBA

gopal904

New Member
Joined
Jan 11, 2013
Messages
2
Hi,

I am new to vba. I am preparing an excel sheet which has option button. When selecting and unselecting that option button, the assigned cell value show True or False respectively. if the particular cell value is false, I want to hide 3 rows whose range is dynamic. That means, the rows number that i need to hide changes, it is first 16:18 or 25:18. But it is only three continuous rows that I want to hide. But the value of cell in column 2 of the first row that I want to hide will be constant.

Lets say, I want to hide rows 18:21, in which column 2 of the row 18 has value Bricks Masonry, I want to hide rows with Brick Masonry + next two rows based on cell value $C$8 if $C$8 is false.

Please help me.
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.

Forum statistics

Threads
1,223,904
Messages
6,175,295
Members
452,631
Latest member
a_potato

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