ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How do I hide a row in excel if a certain other cell is populated (https://www.excelbanter.com/excel-worksheet-functions/112914-how-do-i-hide-row-excel-if-certain-other-cell-populated.html)

Teresa Hoffman

How do I hide a row in excel if a certain other cell is populated
 
I would like to have certain cells in my excel workbook to be used as on/off
switches that will hide other rows if designated. How do I do this?

Carim

How do I hide a row in excel if a certain other cell is populated
 
Hi Teresa,


With an event macro to be inserted in a sheet module ...

Private Sub Worksheet_Change(ByVal Target As Range)
If Range("A1").Value = 0 Then
'adjust to your need
Range("A1").Offset(6, 0).EntireRow.Hidden = True 'adjust to
your need
Else
Range("A1").Offset(6, 0).EntireRow.Hidden = False
End If
End Sub

HTH
Cheers
Carim



All times are GMT +1. The time now is 11:20 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com