ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   how do I hide rows in excel based on values input on sheet ? (https://www.excelbanter.com/excel-programming/356662-how-do-i-hide-rows-excel-based-values-input-sheet.html)

tbo

how do I hide rows in excel based on values input on sheet ?
 
need to hide certain rows based on values entered elsewhere on the sheet -
please assist


ph8[_49_]

how do I hide rows in excel based on values input on sheet ?
 

in VBA:


Code
-------------------
If Cells(1, "A") = "ValueToTestFor" Then
Cells(2, "B").EntireRow.Hide = True
Else
Cells(2, "B").EntireRow.Hide = False
End I
-------------------


Replace the cell addresses with the respective cells

--
ph
-----------------------------------------------------------------------
ph8's Profile: http://www.excelforum.com/member.php...fo&userid=1987
View this thread: http://www.excelforum.com/showthread.php?threadid=52484



All times are GMT +1. The time now is 01:49 PM.

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