Skip to content

Instantly share code, notes, and snippets.

@honzapav
Created November 28, 2015 12:56
Show Gist options
  • Save honzapav/298262cabfdcc7768ded to your computer and use it in GitHub Desktop.
Save honzapav/298262cabfdcc7768ded to your computer and use it in GitHub Desktop.
Sub HideEveryOtherRow()
'Updateby20140317
Dim rng As Range
Dim InputRng As Range
xTitleId = "KutoolsforExcel"
Set InputRng = Application.Selection
Set InputRng = Application.InputBox("Range :", xTitleId, InputRng.Address, Type:=8)
Application.ScreenUpdating = False
For i = 1 To InputRng.Rows.Count Step 2
Set rng = InputRng.Cells(i, 1)
rng.EntireRow.Hidden = True
Next
Application.ScreenUpdating = True
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment