Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I want to make a macro that will recognize a value in a cell and then hide
rows that I don't need. for example: cell is J20 If I put into the cell the value of "A1" then hide rows 11:20 "A2" hides rows 21:30 "B1" hides rows 11:30 and of course nothing in the cell does not hide anything. I found a little format in the FAQ's section, but it was not very helpful. I adusted it to try to see if it would work for me, but upon trying it, nothing happened. Either it doesn't automatically tie itself to the cell and I have to activate the thing or I'm not doing it right. Most likely the latter. Private Sub Worksheet_Change(ByVal Target As Range) If Intersect(Target, Range("J20")) Is Nothing Then Exit Sub Else Rows("11:20").Select Selection.EntireRow.Hidden = True ActiveSheet.PageSetup.PrintArea = "$A$1:$I$10" End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
auto-hide rows, cell format (# and @), update cell refs, shade cel | Excel Discussion (Misc queries) | |||
hide rows where cell condition is not met | Excel Worksheet Functions | |||
Hide Rows if cell value is | New Users to Excel | |||
hide rows when the cell is #VALUE! | Excel Worksheet Functions | |||
hide rows if cell=0 | Excel Programming |