Macro to show/hide rows
Not sure exactly what you want, but try this.
Sub HideUnhide()
Rows("2:" & Rows.Count).Hidden = True
If Range("B1") = 6 Then
Rows("2:13").Hidden = False
ElseIf Range("B1") = 10 Then
Rows("2:21").Hidden = False
End If
End Sub
"New2Macros" wrote:
I need to use a single cell to show/hide other rows. For instance if you put
a "6" in cell B1 it would show the next 12 rows and hide the rest. If you
put in a "10" it would show the next 20 rows and hide the rest, etc.
I'm new to writing macros, sorry!
|