Hello every One . I hope To help me To reverse this Code
This code Hide From Row 8 to Row 20 . I want to Start Hide form row20- row8
Thx
Sub test2()
Dim startRow As Long: startRow = 8
Dim lastRow As Long: lastRow = 20
Do While startRow < lastRow + 1
If ActiveSheet.Rows(startRow & ":" & startRow).Hidden = False Then
ActiveSheet.Rows(startRow & ":" & startRow).Hidden = True
startRow = lastRow + 1
End If
startRow = startRow + 1
Loop
End Sub
This code Hide From Row 8 to Row 20 . I want to Start Hide form row20- row8
Thx
Sub test2()
Dim startRow As Long: startRow = 8
Dim lastRow As Long: lastRow = 20
Do While startRow < lastRow + 1
If ActiveSheet.Rows(startRow & ":" & startRow).Hidden = False Then
ActiveSheet.Rows(startRow & ":" & startRow).Hidden = True
startRow = lastRow + 1
End If
startRow = startRow + 1
Loop
End Sub