Hide Columns AND Rows based on certain cell value

Charleshb

New Member
Joined
Nov 22, 2020
Messages
7
Office Version
  1. 2019
Platform
  1. Windows
Hello, this will be a really simple one to resolve but I am trying to hide both Columns (E:H) and Rows (7:10) based on cell B2 showing as “Y”. I can do each one separately but they don’t seem to work together. Any help would be appreciated!
 
Yes, I copied the above in to the window for the relevant worksheet but nothing is changing when I change between Y and N
 
Upvote 0

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Ok, put you cursor anywhere on this line of the code If Target.CountLarge > 1 Then Exit Sub& press F9
That line should then have a brown background. If you then change the value in B2 does the editor open up with line highlighted yellow?
 
Upvote 0
Ok, it is now working. Thanks so much for your help - i will still be reading up though ;)
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0
Solution

Forum statistics

Threads
1,215,759
Messages
6,126,727
Members
449,332
Latest member
nokoloina

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