VBA Help: Hide/Unhide rows based off cell value on multiple worksheets

nicci1234

New Member
Joined
Apr 4, 2022
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hello, Sorry if this has been asked before but I am truly a newbie to this and cannot figure this out. I am self taught through searching and YouTube videos. Thank you for any assistance you can provide.
I have already used a code to hide/unhide tabs based off a specific cell value but now I need to hide/unhide rows based off that same cell value across multiple worksheets.
Cell "STORE" on worksheet 1 is "NO" it will hide worksheet 7. If "YES" it will show worksheet 7. This code is entered in on worksheet 1. Now I need a code for Cell "STORE" on worksheet 1 is "NO" to hide/unhide rows 22:23, 27-35, 39 on worksheet 3; 3-17 on worksheet 4; and so on. I will also need to be able to add additional cell values to have the code look at and hide/unhide additional rows in the same worksheets.
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Here is the first code I am using to hide/unhide tabs:

Private Sub Worksheet_Change(ByVal Target As Range)

If [STORE] = "NO" Then
Sheets("STORE").Visible = False
Else
Sheets("STORE").Visible = True
End If
End Sub
 
Upvote 0

Forum statistics

Threads
1,213,536
Messages
6,114,215
Members
448,554
Latest member
Gleisner2

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