How to hide every other row in Excel?
When you need to hide every other row in Excel, how could you quickly get it done? Just hiding the row one after another? Or you could go through the follow instruction to quickly hide every other row in Excel.
The following short VBA code can help you quickly hide every other row, please do as following steps:1. Click Developer > Visual Basic, a new Microsoft Visual Basic for applications window will be displayed, click Insert > Module, and input the following code into the Module:
Dim n As Integer, i As Integer
n = Cells.SpecialCells(xlCellTypeLastCell).Row
Dim isHidden As Boolean
isHidden = Rows(1).Hidden
For i = 1 To n Step 2
Rows(i).Hidden = Not isHidden
The i=1 is a variable, stand for the row which be hidden from, you can change it as you need.
2. Then click button to run the code.
3. And all of the odd rows from first row have been hidden.
With Kutools for Excel, you can hide every other row within two major steps: A: first select every other row with Select Interval Rows/Columns tool; B: Set them to hide. Do as follows:
1. Put the cursor at the row header and select the entire rows of the range that you want to hide.
2. Click Kutools > Select Tools > Select Interval Rows/Columns, and a Select Interval Rows/Columns dialog box will pop out. See screenshot:
3. Then choose Rows from the Select option and enter the number 1 separately into the Interval of and Rows boxes.
4. And then click OK. All of the alternate rows have been selected.
5. Put the cursor at any row header which row has been highlighted, then right click, choose hide from the menu. And all of the alternate rows have been hidden. See screenshot: