Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.newusers
|
|||
|
|||
hide rows based on cell value
I'm new to Excel and VBA. I try to hide rows based on whether the user enters
a specific word(s)/phrase into a specific cell. For example, if cell M49 has a value of "i love lucy", then unhide rows 50 through 55, if cell M49 is empty or has any other value than "i love lucy", then hide the rows. How do I implement that? |
#2
Posted to microsoft.public.excel.newusers
|
|||
|
|||
hide rows based on cell value
' Sheet 1 Class Module
Private Sub Worksheet_Change(ByVal Target As Range) If Intersect(Target, Range("M49")) Is Nothing Then Exit Sub If LCase(Range("M49").Value) = "i love lucy" Then Range("A50:A55").EntireRow.Hidden = False Else Range("A50:A55").EntireRow.Hidden = True End If End Sub Regards Trevor "dummster" wrote in message ... I'm new to Excel and VBA. I try to hide rows based on whether the user enters a specific word(s)/phrase into a specific cell. For example, if cell M49 has a value of "i love lucy", then unhide rows 50 through 55, if cell M49 is empty or has any other value than "i love lucy", then hide the rows. How do I implement that? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Insert rows based on specific value | Excel Worksheet Functions | |||
Moving rows from one sheet to another based on a particular cell v | Excel Discussion (Misc queries) | |||
Hide/Delete entire rows based in the content of one cell | Excel Discussion (Misc queries) | |||
macro to hide rows if cell is blank | Excel Worksheet Functions | |||
Cell color based upon cell value | Excel Discussion (Misc queries) |