Can I hide rows based on a tab being hidden. What im looking to do is if a tab is hidden on another tab where Im getting that info from I want that row to hide its self.
If I am reading you correctly you want to hide a row or set of rows on one sheet if another sheet is hidden. Example if Sheet2 is hidden on Sheet1 hide rows 1 to 10.
Code:
Sub rowHideBySheet()
'// Rows to hide are on Sheet1
With Sheets("Sheet1")
.Rows("1:10").EntireRow.Hidden = Not (Sheets("Sheet2").Visible)
.Rows("11:20").EntireRow.Hidden = Not (Sheets("Sheet3").Visible)
End With
End Sub
The above will both hide and unhide depending on sheet visibility. You just have to change the sheet names and rows to match you application.
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.