Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I have code to hide rows (which works) and I also have code to unhide
rows. I'm simply having trouble combining the code into one macro. If anybody can help I will greatly appreciate it. Below is a copy of the code. Thanks. Sub hide_rows() Dim RowNdx As Long Dim LastRow As Long LastRow = ActiveSheet.Cells(Rows.Count, "V").End(xlUp).Row For RowNdx = LastRow To 5 Step -1 If Cells(RowNdx, "V").Value = 0 Then Rows(RowNdx).Hidden = True End If Next RowNdx End Sub ________________________________ Sub Unhide() Dim RowNdx As Long Dim LastRow As Long LastRow = ActiveSheet.Cells(Rows.Count, "V").End(xlUp).Row For RowNdx = LastRow To 5 Step -1 If Cells(RowNdx, "V").Value 0 Then Rows(RowNdx).Hidden = False End If Next RowNdx End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Hide / Unhide columns and rows | Excel Discussion (Misc queries) | |||
How to hide and unhide Rows & Columns | Excel Worksheet Functions | |||
Hide Unhide Rows | Excel Discussion (Misc queries) | |||
Conditional Hide/Unhide Rows | Excel Discussion (Misc queries) | |||
Checkbox to hide and unhide rows Please. | Excel Worksheet Functions |